public class AESSecureMessagingWrapper extends SecureMessagingWrapper implements Serializable
| Constructor and Description |
|---|
AESSecureMessagingWrapper(SecretKey ksEnc,
SecretKey ksMac,
long ssc)
Constructs a secure messaging wrapper based on the secure messaging
session keys and the initial value of the send sequence counter.
|
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
getEncryptionKey()
Gets the shared key for encrypting APDU payloads.
|
SecretKey |
getMACKey()
Get the shared key for computing message authentication codes over APDU payloads.
|
long |
getSendSequenceCounter()
Gets the current value of the send sequence counter.
|
String |
toString() |
net.sf.scuba.smartcards.ResponseAPDU |
unwrap(net.sf.scuba.smartcards.ResponseAPDU responseAPDU)
Unwraps the buffer of a response APDU.
|
net.sf.scuba.smartcards.CommandAPDU |
wrap(net.sf.scuba.smartcards.CommandAPDU commandAPDU)
Wraps the apdu buffer
capdu of a command apdu. |
public AESSecureMessagingWrapper(SecretKey ksEnc, SecretKey ksMac, long ssc) throws GeneralSecurityException
ksEnc - the session key for encryptionksMac - the session key for macsssc - the initial value of the send sequence counterGeneralSecurityException - when the available JCE providers cannot provide the necessary cryptographic primitivespublic long getSendSequenceCounter()
getSendSequenceCounter in class SecureMessagingWrapperpublic net.sf.scuba.smartcards.CommandAPDU wrap(net.sf.scuba.smartcards.CommandAPDU commandAPDU)
capdu of a command apdu.
As a side effect, this method increments the internal send
sequence counter maintained by this wrapper.wrap in interface net.sf.scuba.smartcards.APDUWrappercommandAPDU - buffer containing the command apdu.public net.sf.scuba.smartcards.ResponseAPDU unwrap(net.sf.scuba.smartcards.ResponseAPDU responseAPDU)
unwrap in interface net.sf.scuba.smartcards.APDUWrapperresponseAPDU - the response APDUpublic SecretKey getEncryptionKey()
SecureMessagingWrappergetEncryptionKey in class SecureMessagingWrapperpublic SecretKey getMACKey()
SecureMessagingWrappergetMACKey in class SecureMessagingWrapperCopyright © 2016. All rights reserved.