The Sharia code is here:
www.agc.gov.bn/AGC%20Images/LAWS/Gazette_PDF/2013/EN/s069.pdf
Zina (extramarital sex by a Muslim, or with a Muslim) is prohibited since then.
It is not necessary to have 4 syahid (witnesses), ikrar (confession) is also sufficient.
They distinguish between muhshan (married) - stone to death - and ghairu muhshan (unmarried) - 100 strokes of the cane and 1 year in prison.
If the syahid/ikrar are lacking, the penalty is 30 strokes + up to 7 years for muhshan, and 15 strokes + up to 3 years for ghairu muhshan.
Anal sex (both straight and gay) is called liwat, and carries the same penalty as zinah (and the same provisions about confessions etc). Lesbian sex is called musahaqah and is punished with whipping, prison and fines.
If a woman is accused of zina by her husband, she must be imprisoned until she either swears an oath she did not do it, or accepts the accusation (in which case this is of course ikrar for zina and she must be stoned to death forthwith).
This does not apply the other way round, of course.
There is not an offence of 'rape' per se, but rather 'zina bil-jabar', which is to say 'zina by force' (or by deception).
It should be noted that the Shariah code does NOT, not at ALL treat the lack of consent as the issue.
Compare:
Zina (having sex outside with marriage), when proven with ikrar/4 syahid
- married person - stoned to death
- unmarried person - 100 strokes + 1 year prison
Zina without that kind of evidence
- married person - up to 30 strokes and up to 7 years prison
- unmarried person - up to 15 strokes and up to 3 years prison
Then zina bil-jabar (rape); with the witnesses/confession:
- married rapist - stoning to death
- unmarried rapist - 100 strokes + 1 year
Without the witnesses/confession
- married rapist - UP TO 30 years and UP TO 40 strokes
- unmarried rapist - UP TO 15 years and UP TO 20 strokes
So if you rape someone and you aren't married, then you confess and get a year in prison (and 100 lashes, which is no picnic, to be sure).
But consensual sex with/by a married person earns the death penalty if you confess.
A further provision provides that a woman who gives birth either outside wedlock, or within 6 months of marriage, will be imprisoned and/or fined, unless she can prove she was raped.
Note that it was passed in 2013, but it was commenced in two stages:
1st May 2014 - www.agc.gov.bn/AGC%20Images/LAWS/Gazette_PDF/2014/EN/S017.pdf
- pregnancy out of wedlock
- various offences relating to females leaving their parents' custody
- apostasy / blasphemy etc
- zakat (i.e. tithing)
3 April 2019
www.agc.gov.bn/AGC%20Images/LAWS/Gazette_PDF/2018/S068.pdf
basically everything else including zina, liwat, and musahaqah.
The BBC and similar fucked up fucking stupid fuckwits from fuckhead land have described it as an anti-LGBT law.
www.bbc.co.uk/news/world-asia-47769964
Which it is but only if you ignore the fact you can be stoned to fucking death for having consensual sex of any kind, and you will be sent to prison if your husband accuses of adultery and you don't either admit it (= stoning to death) or deny it.
The BBC are calling it adultery because they are fucking stupid.
It is NOT adultery. It is 'zina', which is a Sharia term, and is NOT the same as 'adultery' as anyone reading the BBC news would understand 'adultery' to mean, since it includes any kind of extra-marital sex.
Note btw that men can marry as many women as they like, so adultery is not so much of an issue. Women not only cannot marry more than one man, but are not allowed to marry (and hence have sex) after the death of their husband, or divorce for a suitable period (iddah). I believe this would still be muhshan and hence stoning to death as well.
Also from what I can see the code sometimes distinguishes between male and female syahid, e.g., saying 1 male or 2 female syahid (in the context of other matters), but for this penal code I think women count as witnesses.
Note btw that it's not as hard as you'd think to get 4 witnesses, in places where these laws exist you tend to get mobs of young men forming Sharia patrols to catch people out.