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}

ParamDescription
mThe new active mode of operation (ECB, CBC, OFB, CFB etc)
ivThe 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}

ParamDescription
mis the active mode of operation (ECB, CBC, OFB, CFB etc)
nis the key length in bytes, 16, 24 or 32
keythe AES key as an array of 16 bytes
ivthe Initialisation Vector

aeS.ecb_encrypt(buff)

Encrypt a single 16 byte block in ECB mode

Kind: instance method of AES
this: {AES}

ParamTypeDescription
buffstringis 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}

ParamDescription
buffis 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}

ParamTypeDescription
buffstringis 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}

ParamTypeDescription
buffstringis 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}