Package org.jmrtd

Class PACESecretKeySpec

    • Constructor Detail

      • PACESecretKeySpec

        public PACESecretKeySpec​(byte[] key,
                                 int offset,
                                 int len,
                                 String algorithm,
                                 byte paceKeyReference)
        Constructs a secret key from the given byte array, using the first len bytes of key, starting at offset inclusive.
        Parameters:
        key - the key bytes
        offset - the offset with key
        len - the length of the key within key
        algorithm - the name of the secret-key algorithm to be associated with the given key material
        paceKeyReference - a reference specifying the type of key from BSI TR-03110 (Appendix B)
      • PACESecretKeySpec

        public PACESecretKeySpec​(byte[] key,
                                 String algorithm,
                                 byte paceKeyReference)
        Constructs a secret key from the given byte array.
        Parameters:
        key - the key bytes
        algorithm - the name of the secret-key algorithm to be associated with the given key material
        paceKeyReference - a reference specifying the type of key from BSI TR-03110 (Appendix B)
    • Method Detail

      • getKeyReference

        public byte getKeyReference()
        Returns reference specifying the type of key from BSI TR-03110 (Appendix B).
        Returns:
        a key reference
      • getKey

        public byte[] getKey()
        Returns the encoded key (key seed) used in key derivation.
        Specified by:
        getKey in interface AccessKeySpec
        Returns:
        the encoded key