public String extractPassword(Authenticator a,String secret) throws IOException {
  final int valLen=((super.getOctets()[1]) & 0xFF) - 2;
  final byte[] cipherText=new byte[valLen];
  System.arraycopy(super.getOctets(),2,cipherText,0,valLen);
  final byte[] clearText=UserPasswordAttribute.convert(cipherText,Direction.DECRYPT,secret,a);
  int i=0;
  for (; i < clearText.length; i++) {
    if (clearText[i] == 0) {
      break;
    }
  }
  return new String(clearText,0,i,StandardCharsets.UTF_8);
}

public String extractPassword ( Authenticator a , String secret ) throws IOException { final int valLen = ( ( super . getOctets ( ) [ 1 ] ) & 0xFF ) - 2 ; final byte [ ] cipherText = new byte [ valLen ] ; System . arraycopy ( super . getOctets ( ) , 2 , cipherText , 0 , valLen ) ; final byte [ ] clearText = UserPasswordAttribute . convert ( cipherText , Direction . DECRYPT , secret , a ) ; int i = 0 ; for ( ; i < clearText . length ; i ++ ) { if ( clearText [ i ] == 0 ) { break ; } } return new String ( clearText , 0 , i , StandardCharsets . UTF_8 ) ; }
extracts the plain text password from the cipher text for instances created from on - the - wire octets .
