public RequestAuthenticator(SecureRandom rand,String secret) throws NoSuchAlgorithmException {
  final byte[] authenticator=new byte[16];
  rand.nextBytes(authenticator);
  final MessageDigest md5=MessageDigest.getInstance("MD5");
  md5.update(authenticator);
  md5.update(secret.getBytes(StandardCharsets.UTF_8));
  octets=md5.digest();
}

public RequestAuthenticator ( SecureRandom rand , String secret ) throws NoSuchAlgorithmException { final byte [ ] authenticator = new byte [ 16 ] ; rand . nextBytes ( authenticator ) ; final MessageDigest md5 = MessageDigest . getInstance ( "MD5" ) ; md5 . update ( authenticator ) ; md5 . update ( secret . getBytes ( StandardCharsets . UTF_8 ) ) ; octets = md5 . digest ( ) ; }
generates a request authenticator field consisting of a 16 octet random number per section 3 of rfc 2865 .
