opencard.core.terminal
Interface CHVEncoder


public abstract interface CHVEncoder

Encode a String for card holder verification.


Field Summary
static java.lang.String BCD_ENCODING
          The CHV is actually a PIN that is encoded in packed binary coded decimals (BCD)
static java.lang.String STRING_ENCODING
          String encoding; that is, use the String.getBytes() method.
 
Method Summary
 byte[] encodeCHV(java.lang.String chv)
          Transform a Java String into a byte array suitable for the verification command
 

Field Detail

STRING_ENCODING

public static final java.lang.String STRING_ENCODING
String encoding; that is, use the String.getBytes() method. This is only an intermediate solution.

BCD_ENCODING

public static final java.lang.String BCD_ENCODING
The CHV is actually a PIN that is encoded in packed binary coded decimals (BCD)
Method Detail

encodeCHV

public byte[] encodeCHV(java.lang.String chv)
Transform a Java String into a byte array suitable for the verification command
Parameters:
chv - the String (returned by keyboardInput e.g.)
Returns:
a byte array containing the encoded CHV string