de.rtner.security.auth.spi
Class PBKDF2HexFormatter

java.lang.Object
  extended by de.rtner.security.auth.spi.PBKDF2HexFormatter
All Implemented Interfaces:
PBKDF2Formatter

public class PBKDF2HexFormatter
extends java.lang.Object
implements PBKDF2Formatter

Hexadecimal PBKDF2 parameter encoder/decoder.

This formatter encodes/decodes Strings that consist of

  1. hex-encoded salt bytes
  2. colon (':')
  3. iteration count, positive decimal integer
  4. colon (':')
  5. derived key bytes


Constructor Summary
PBKDF2HexFormatter()
           
 
Method Summary
 boolean fromString(PBKDF2Parameters p, java.lang.String s)
          Convert String to parameters.
 java.lang.String toString(PBKDF2Parameters p)
          Convert parameters to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PBKDF2HexFormatter

public PBKDF2HexFormatter()
Method Detail

fromString

public boolean fromString(PBKDF2Parameters p,
                          java.lang.String s)
Description copied from interface: PBKDF2Formatter
Convert String to parameters. Depending on actual implementation, it may be required to set further fields externally.

Specified by:
fromString in interface PBKDF2Formatter
Parameters:
p - Decode input string s into this parameter object (output).
s - String representation of parameters to decode.
Returns:
false syntax OK, true some syntax issue.

toString

public java.lang.String toString(PBKDF2Parameters p)
Description copied from interface: PBKDF2Formatter
Convert parameters to String.

Specified by:
toString in interface PBKDF2Formatter
Parameters:
p - Parameters object to output.
Returns:
String representation