|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--SecureChannel
Class implementing a secure messaging channel
Defined in securechannel.js
Field Summary | |
Object |
crypto
|
Object |
policy
|
Constructor Summary | |
SecureChannel(<Crypto> crypto)
Create a secure channel |
Method Summary | |
ByteString
|
getIV()
Return an initialisation vector based on the defined policy |
void
|
setEncKey(<Key> key)
Sets the key used for encryption |
void
|
setEncSendSequenceCounter(<ByteString> ssc)
Set the send sequence counter for encryption calculation |
void
|
setMacKey(<Key> key)
Sets the key used for message authentication |
void
|
setMACSendSequenceCounter(<ByteString> ssc)
Set the send sequence counter for MAC calculation |
void
|
setSendSequenceCounterPolicy(<Number> policy)
Sets the policy for handling send sequence counters |
void
|
unwrap(<APDU> apdu)
Unwrap a secure messaging APDU recovering the content |
void
|
wrap(<APDU> apdu)
Wrap an APDU for secure messaging |
<static> ByteBuffer
|
pad(<ByteBuffer> buffer, <Number> blocksize)
Applies ISO padding to the input buffer |
<static> ByteString
|
removePadding(<ByteString> buffer)
Removes the ISO padding |
Field Detail |
Object crypto
Object policy
Constructor Detail |
SecureChannel(<Crypto> crypto)
crypto
- the crypto provider
Method Detail |
ByteString getIV()
void setEncKey(<Key> key)
key
- the encryption key
void setEncSendSequenceCounter(<ByteString> ssc)
ssc
- the send sequence counter
void setMacKey(<Key> key)
key
- the message authentication key
void setMACSendSequenceCounter(<ByteString> ssc)
ssc
- the send sequence counter
void setSendSequenceCounterPolicy(<Number> policy)
policy
- one of IsoSecureChannel.SSC_DEFAULT_POLICY, SSC_SYNC_POLICY or SSC_SYNC_ENC_POLICY
void unwrap(<APDU> apdu)
apdu
- the APDU to unwrap
void wrap(<APDU> apdu)
apdu
- the APDU to wrap
<static> ByteBuffer pad(<ByteBuffer> buffer, <Number> blocksize)
buffer
- the input buffer
blocksize
- the block size
<static> ByteString removePadding(<ByteString> buffer)
buffer
- the input with with padding
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |