AESDecoder()
Syntaxe
Result = AESDecoder(*Input, *Output, Size, *Key, Bits, *InitializationVector [, Mode])Description
Decodes the specified input buffer using the AES algorithm into the output buffer.
Arguments
*Input Specifies the input buffer with the encoded data. *Output Specifies the output buffer which will receive the plain data. It has to be different than the input buffer. Size Specifies the amount of bytes to decode. It has to be at least 16 bytes. To decode something smaller, padding has to be added before the encoding. *Key Specifies a buffer containing the key for decoding. Its size depends of the 'Bits' parameter: l6 bytes for 128 bit encryption, 24 bytes for 192 bit and 32 bytes for 256 bit. Bits Specifies the size of the key used by the ciphering. Valid values are 128, 192 and 256. *InitializationVector The InitializationVector is a random data block, used to initialize the ciphering to avoid breach in decoding (only needed when using the #PB_Cipher_CBC mode). Its size depends of the 'Bits' parameter: l6 bytes for 128 bit encryption, 24 bytes for 196 bit and 32 bytes for 256 bit. The contents of this data block must match the one which was used when encoding the data. Mode (optional) The optional 'Mode' parameter can be one of the following value: #PB_Cipher_CBC: Default mode of encoding (Cipher Block Chaining). Needs an '*InitializationVector'. Recommended as more secure than ECB mode. #PB_Cipher_ECB: Alternative mode (Electronic CodeBook). It doesn't uses random value nor chaining (each block is ciphered independently) making it less strong the CBC.
Valeur de retour
Returns nonzero if the encoding was successful or zero otherwise.
Remarks
For more information about AES and source examples, see AESEncoder().
See Also
AESEncoder(), StartAESCipher()
OS Supportés
Tous