Encryption Functions

Encrypt(strValue)

Returns encrypted string

Decrypt(strValue)

Returns decrypted string

sEncrypt(strValue)

Returns near human readable simple encrypted string

sDecrypt(strValue)

Returns decrypted string

Installation

The encrypt() and decrypt() function use the RyeolStringEncryptor. The DLL is for botht the 64bit and 32bit version has the same name. Therefore, the file is installed in the \windows\system32 and \windows\syswow64 respectively. (Yes, the 64bit version goes in the system32 folder.

The binary and source is stored in the /components/encryption folder.

Background

Encryption of the string uses an MD5 key hash algorithm to ensure compatability with the ASP.NET components used for transactions and email broadcasting.

The component used also supports SHA2-256. More information is available here.

For example:-

'
'  ASP (VBScript)
'
Const conKey = "This is a secret key."
Const conIV = "This is an initialization vector."
 
' Creates an instance.
Set objEncrypter = Server.CreateObject("Ryeol.StringEncrypter")
 
objEncrypter.Key = conKey
objEncrypter.IV = conIV
 
' Sets the key hash algorithm. MD5 and SHA2-256 are supported.
' In this case the hash size is 256 bits, AES-256 is used.
objEncrypter.KeyHashAlgorithm = "SHA2-256"
 
' Encrypts a string.
strEncrypted = objEncrypter.Encrypt("Test sample")
 
' Decrypts the encrypted string.
strDecrypted = objEncrypter.Decrypt(strEncrypted)
 

 

comments powered by Disqus