javacard.security
Interface AESKey

All Superinterfaces:
Key, SecretKey

public interface AESKey
extends SecretKey

AESKey contains a 16/24/32 byte key for AES computations based on the Rijndael algorithm.

When the key data is set, the key is initialized and ready for use.

Since:
Java Card 2.2
See Also:
KeyBuilder

Method Summary
 byte getKey(byte[] keyData, short kOff)
          Returns the Key data in plain text.
 void setKey(byte[] keyData, short kOff)
          Sets the Key data.
 
Methods inherited from interface javacard.security.Key
clearKey, getSize, getType, isInitialized
 

Method Detail

setKey

public void setKey(byte[] keyData,
                   short kOff)
            throws CryptoException,
                   NullPointerException,
                   ArrayIndexOutOfBoundsException
Sets the Key data. The plaintext length of input key data is 16/24/32 bytes. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte). Input key data is copied into the internal representation.

Note:

Throws:
CryptoException
NullPointerException
ArrayIndexOutOfBoundsException

getKey

public byte getKey(byte[] keyData,
                   short kOff)
            throws CryptoException
Returns the Key data in plain text. The length of output key data is 16/24/32 bytes. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).

Throws:
CryptoException


Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.