The previous function was only supporting the flag 1 or .T. meaning case insensitive compare
CLASS ot4xb_cng
The purpose of the ot4xb_cng class is to provide some encryption and decryption methods using the Windows CNG API
Syntax
AES 256 methods
ot4xb_cng():aes_encrypt( cInputStr , flags) -> cOutputString
ot4xb_cng():aes_decrypt( cInputStr , flags ) -> cOutputString
RC4 methods
ot4xb_cng():rc4_encrypt( cInputStr , flags ) -> cOutputString
ot4xb_cng():rc4_decrypt( cInputStr , flags ) -> cOutputString
- flags
- _ot4xb_expando_() object providing the required parameters for the encryption or decryption operations
- cInputStr
- The string to be encrypted or decrypted. flags:encode_input will determine the expected content
- cOutputString
- The string resulting from the encryption or decryption operation. flags:encode_input will determine the expected content
common flags
- flags:encode_input
- supported values are "bin","hex" and "base64" or "b64"
- flags:encode_output
- supported values are "bin","hex" and "base64" or "b64"
- flags:key
- key or password phrase used for the encryption or decryption operation
- flags:encode_key
- supported values are "bin","hex" and "base64" or "b64"
- flags:mode
- Suported modes for AES are "ebc" or "cbc"
- flags:aes_block_padding
- Logical value. default .F.
- flags:IV
- CBC mode will require a 16 bytes initialization string
- flags:encode_IV
- supported values are "bin","hex" and "base64" or "b64"
No comments:
Post a Comment