Interface CHVEncoder


  • public interface CHVEncoder
    Encode a String for card holder verification.
    Author:
    Peter Trommler (trp@zurich.ibm.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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 F2B_ENCODING
      The CHV is actually a PIN that is encoded in packed binary coded decimals (BCD) using ISO 9564-1 Format 2 Block
      static java.lang.String PACE_ENCODING
      The CHV is verified by establishing a PACE channel
      static java.lang.String STRING_ENCODING
      String encoding; that is, use the String.getBytes() method.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] encodeCHV​(java.lang.String chv)
      Transform a Java String into a byte array suitable for the verification command
    • Field Detail

      • STRING_ENCODING

        static final java.lang.String STRING_ENCODING
        String encoding; that is, use the String.getBytes() method. This is only an intermediate solution.
        See Also:
        Constant Field Values
      • BCD_ENCODING

        static final java.lang.String BCD_ENCODING
        The CHV is actually a PIN that is encoded in packed binary coded decimals (BCD)
        See Also:
        Constant Field Values
      • F2B_ENCODING

        static final java.lang.String F2B_ENCODING
        The CHV is actually a PIN that is encoded in packed binary coded decimals (BCD) using ISO 9564-1 Format 2 Block
        See Also:
        Constant Field Values
      • PACE_ENCODING

        static final java.lang.String PACE_ENCODING
        The CHV is verified by establishing a PACE channel
        See Also:
        Constant Field Values
    • Method Detail

      • encodeCHV

        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