This functions are used to crypt data:
- AES128(boolHex, boolDebug): Class constructor. The parameter boolHex configure the class to return de encripted/decripted data in hexadecimal(true) or in binary (false). The parameter boolDebug configure the class to show the debug information. Call the constructor without parameter is the same as AES128(false, false)
- makeKey(txtClave): Return the sub-keys to encrypt/decrypt data. The parameter txtClave is the cipher key (128 bits or 16 characters)
- blockEncrypt(txtDatos, arrayClave): Encrypt one data block with a length of 128 bits (16 characters). The parameter txtDatos is the data block to encrypt and the parameter arrayClave are the sub-keys to cipher maked with makeKey() function.
- blockDecrypt(txtDatos, arrayClave): Decrypt one data block with a length of 128 bits (16 characters). The parameter txtDatos is the data block to decrypt and the parameter arrayClave are the sub-keys to cipher maked with makeKey() function.
- self_test(): Checks the algorithm.