SecureRandom rnd = new SecureRandom (); rnd.nextBytes(PS);
prng.nextBytes(PS);
  public byte[] encode(final byte[] M)  {    // a. Generate an octet string PS of length k - mLen - 3 consisting    //    of pseudo-randomly generated nonzero octets.  The length of PS    //    will be at least eight octets.    final byte[] PS = new byte[k - M.length - 3];    // FIXME. This should be configurable, somehow.    SecureRandom rnd = new SecureRandom ();    rnd.nextBytes(PS);    int i = 0;    for (; i < PS.length; i++)      {        if (PS[i] == 0)          PS[i] = 1;      }    // b. Concatenate PS, the message M, and other padding to form an    //    encoded message EM of length k octets as    //    //    EM = 0x00 || 0x02 || PS || 0x00 || M.    return assembleEM(PS, M);  }