Interface XECKey

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      short getEncoded​(byte[] value, short offset)
      Copy the encoded key value in the specified buffer and return the offset in the destination buffer that follows the last byte copied.
      short getEncodingLength()
      Returns the length of the encoded form of the key
      NamedParameterSpec getParams()
      Returns the extended key parameters associated with the key when it was created.
      void setEncoded​(byte[] value, short offset, short length)
      Initialize the key using the specified encoded form.
    • Method Detail

      • getParams

        NamedParameterSpec getParams()
        Returns the extended key parameters associated with the key when it was created.
        Returns:
        the extended key parameter
      • getEncodingLength

        short getEncodingLength()
        Returns the length of the encoded form of the key
        Returns:
        the encoding length
      • getEncoded

        short getEncoded​(byte[] value,
                         short offset)
        Copy the encoded key value in the specified buffer and return the offset in the destination buffer that follows the last byte copied. The data length copied is equal to the value returned by getEncodingLength().
        Parameters:
        value - the output buffer where the encoded key should be copied
        offset - the offset in the output buffer where the key should be copied
        Returns:
        offset + length of copied data
        See Also:
        getEncodingLength()
      • setEncoded

        void setEncoded​(byte[] value,
                        short offset,
                        short length)
                 throws CryptoException
        Initialize the key using the specified encoded form. The length must be equal to the value returned by getEncodingLength().
        Parameters:
        value - the buffer containing the encoded key
        offset - the offset in the input buffer where the key starts
        length - the encoding length
        Throws:
        CryptoException - with the following reason codes