decode

public byte[] decode(byte[] EM)

Separate the encoded message EM into an octet string
PS consisting of nonzero octets and a message M
as:

EM = 0x00 || 0x02 || PS || 0x00 || M.

If the first octet of EM does not have hexadecimal value
0x00, if the second octet of EM does not have
hexadecimal value 0x02, if there is no octet with hexadecimal
value 0x00 to separate PS from M,
or if the length of PS is less than 8 octets,
output "decryption error" and stop.

Parameters:

EM - the designated encoded message.

Returns:

the decoded message M framed in the designated
EM value.

Throws:

java.lang.IllegalArgumentException - if the length of the designated entity
EM is different than k (the length in bytes of
the public shared modulus), or if any of the conditions described above
is detected.