Tesseract Engine Documentation |
|
Encryption.Encrypt Method
Encrypts specified plaintext using Rijndael symmetric key algorithm and returns a base64-encoded result.
Parameters
-
plainText
- Plaintext value to be encrypted.
-
passPhrase
- Passphrase from which a pseudo-random password will be derived. The derived password will be used to generate the encryption key. Passphrase can be any string. In this example we assume that this passphrase is an ASCII string.
-
saltValue
- Salt value used along with passphrase to generate password. Salt can be any string. In this example we assume that salt is an ASCII string.
-
hashAlgorithm
- Hash algorithm used to generate password. Allowed values are: "MD5" and "SHA1". SHA1 hashes are a bit slower, but more secure than MD5 hashes.
-
passwordIterations
- Number of iterations used to generate password. One or two iterations should be enough.
-
initVector
- Initialization vector (or IV). This value is required to encrypt the first block of plaintext data. For RijndaelManaged class IV must be exactly 16 ASCII characters long.
-
keySize
- Size of encryption key in bits. Allowed values are: 128, 192, and 256. Longer keys are more secure than shorter keys.
Return Value
Encrypted value formatted as a base64-encoded string.
See Also
Encryption Class | DarkWynter.Engine.Utilities.Cryptography Namespace