Question & Answer
Question
How to encrypt text using ASCII Encryption?
Answer
Below is the custom javascript which uses a encryption method that uses random values for each character. You can encrypt the same string as many times as you want and the result will always be different.
function Encrypt(inStr) {
output = new String;
Temp = new Array();
Temp2 = new Array();
TextSize = inStr.length;
for (i = 0; i < TextSize; i++) {
rnd = Math.round(Math.random() * 122) + 68;
Temp[i] = inStr.charCodeAt(i) + rnd;
Temp2[i] = rnd;
}
for (i = 0; i < TextSize; i++) {
output += String.fromCharCode(Temp[i], Temp2[i]);
}
return output;
}
Historical Number
00000478
Product Synonym
Cast Iron Solution;Cast Iron Operating System;Cast Iron Studio
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21453152