StartAESCipher()
语法
Result = StartAESCipher(#Cipher, *Key, Bits, *InitializationVector, Mode)概要
Initializes a new AES cipher stream where data can be added using AddCipherBuffer().
参数
#Cipher The number which identifies this new cipher. #PB_Any can be used to auto-generate this number. *Key A buffer containing the key for decoding. Its size depends of the 'Bits' parameter: l6 bytes for 128-bit encryption, 24 bytes for 196-bit and 32 bytes for 256-bit. Bits 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. Mode This parameter can be a combination of one the following values: #PB_Cipher_Decode: The stream is used to decode data. #PB_Cipher_Encode: The stream is used to encode data. with #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.
返回值
If #PB_Any was used as the #Cipher parameter then the auto-generated #Cipher number is returned.
Remarks
New buffers to be encoded or decoded can be added with AddCipherBuffer(). Once a cipher is finished, FinishCipher() has to be called.
For more information about AES, see AESEncoder().
参阅
AddCipherBuffer(), FinishCipher(), AESEncoder(), AESDecoder()
已支持操作系统
所有