| Libraries |  | Cipher | Source Code |  | 
 | 
| Types | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
cipherAlgorithm
const type: cipherAlgorithm
- 
Enumeration of cipher algorithms. Currently the ciphers NO_CIPHER, RC4, DES, TDES, BLOWFISH, AES and AES_GCM are supported. 
cipherState
const type: cipherState
noCipherState
const type: noCipherState
- 
cipherState implementation type describing the state if no cipher is used. The data remains unencrypted if NO_CIPHER is used. 
| Function Summary | |||||
| integer | 
 | ||||
| cipherState | 
 | ||||
| void | 
 | ||||
| string | 
 | ||||
| string | 
 | ||||
| string | 
 | ||||
| string | 
 | ||||
| Function Detail | 
blockSize
const func integer: blockSize (in cipherAlgorithm: cipherAlg)
- 
Block size used by the given cipherAlgorithm. Stream ciphers have a block size of 0. 
- Returns:
- the block size used by the cipherAlgorithm.
 
setCipherKey
const func cipherState: setCipherKey (in cipherAlgorithm: cipherAlg, in string: cipherKey, in string: initializationVector)
- 
Set key and initialization vector for the given cipherAlgorithm. 
- Parameters:
- cipherAlg - The cipherAlgorithm to be used.
 
- Returns:
- the cipherState of the cipherAlgorithm.
 
initAead
const proc: initAead (inout cipherState: state, in string: recordTypeAndVersion, in integer: sequenceNumber)
- 
Initialize the authenticated encryption with associated data (AEAD). For all other cipher algorithms this function does nothing. 
getComputedMac
const func string: getComputedMac (in cipherState: state)
- 
Obtain the computed MAC of data that has been decrypted with an AEAD cipher. For all other cipher algorithms this function raises an exception. After a successful decryption with an AEAD cipher getComputedMac and getMac should return the same value. 
getMac
const func string: getMac (in cipherState: state)
- 
Obtain the MAC that is appended to the encrypted data of an AEAD cipher. For all other cipher algorithms this function raises an exception. After a successful decryption with an AEAD cipher getComputedMac and getMac should return the same value. 
encode
const func string: encode (inout cipherState: state, in string: plaintext)
- 
Encode a string with the state of the selected cipher algorithm. 
- Returns:
- the encoded string.
 
decode
const func string: decode (inout cipherState: state, in string: encoded)
- 
Decode a string with the state of the selected cipher algorithm. 
- Returns:
- the decoded string.
 
|  | 
 | 

