AES
AES
Kind: global class
this: {"{"}AES{"}"}
new AES()
Creates an instance of AES.
aeS.reset(m, iv)
Reset AES mode or IV
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Description |
---|---|
m | The new active mode of operation (ECB, CBC, OFB, CFB etc) |
iv | The new Initialisation Vector |
aeS.getreg() ⇒
Reset Extract chaining vector
Kind: instance method of AES
Returns: f the extracted chaining vector
this: {"{"}AES{"}"}
aeS.init(m, n, key, iv)
Initialise an instance of AES and its mode of operation
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Description |
---|---|
m | is the active mode of operation (ECB, CBC, OFB, CFB etc) |
n | is the key length in bytes, 16, 24 or 32 |
key | the AES key as an array of 16 bytes |
iv | the Initialisation Vector |
aeS.ecb_encrypt(buff)
Encrypt a single 16 byte block in ECB mode
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Type | Description |
---|---|---|
buff | string | is an array of 16 plaintext bytes, on exit becomes ciphertext |
aeS.ecb_decrypt(buff)
Decrypt a single 16 byte block in ECB mode
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Description |
---|---|
buff | is an array of 16 cipherext bytes, on exit becomes plaintext |
aeS.encrypt(buff)
Encrypt using selected mode of operation
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Type | Description |
---|---|---|
buff | string | is an array of 16 plaintext bytes, on exit becomes ciphertext |
aeS.decrypt(buff)
Decrypt using selected mode of operation
Kind: instance method of AES
this: {"{"}AES{"}"}
Param | Type | Description |
---|---|---|
buff | string | is an array of 16 cipherext bytes, on exit becomes plaintext |
aeS.end()
Clean up and delete left-overs
Kind: instance method of AES
this: {"{"}AES{"}"}