Hi All,
I would require encryption of a field using HMAC-SHA1 encryption algorithm. It will take few parameters like key, cipherMode, data and generate a hex encrypted value in return. I need to encrypt a field value using HMAC-SHA1 mechanism inside JavaScript code.
Can you please help me with the process?
Happy Campaigning
Sumit
Solved! Go to Solution.
Views
Replies
Total Likes
Calculates the MD5, SHA-1 or SHA-256 hash of a string of characters. The string is automatically encoded in UTF-8 before the calculation.
hmacStr
(string
[, key
] [, algo
])
string
The string in which the hash is to be calculated.
key
Key, in the form of a string of characters. It is automatically converted into UTF-8. If the key is missing, the server will use a key that depends on the instance and is only valid on this instance.
algo
Type of hash to use. Possible values are "MD5", "SHA1" or "SHA256". Case is ignored, values can therefore be entered in lower case or upper case. The value "SHA1" is selected by default, if no parameter is specified.
You can find more info in here : ColdFusion Help | Encrypt
Views
Replies
Total Likes
Hi Sumit,
Did you get any process for the above requested requirement. to encrypt and external teams to decrypt the values.
Thanks,
Sivaramakumar
Views
Replies
Total Likes
var message=new MemoryBuffer();
message.fromString("saikat");
var key=new MemoryBuffer();
key.fromString("password");
logInfo(message.hmac(key,"SHA1"))
Views
Replies
Total Likes
Calculates the MD5, SHA-1 or SHA-256 hash of a string of characters. The string is automatically encoded in UTF-8 before the calculation.
hmacStr
(string
[, key
] [, algo
])
string
The string in which the hash is to be calculated.
key
Key, in the form of a string of characters. It is automatically converted into UTF-8. If the key is missing, the server will use a key that depends on the instance and is only valid on this instance.
algo
Type of hash to use. Possible values are "MD5", "SHA1" or "SHA256". Case is ignored, values can therefore be entered in lower case or upper case. The value "SHA1" is selected by default, if no parameter is specified.
You can find more info in here : ColdFusion Help | Encrypt
Views
Replies
Total Likes