How can I compute a MD5 or SHA1 hash of text in a list of cells? For example, I have 100 email addresses in column A row 1-100 and I wish to encrypt them all. I would like to write the encrypted emails in column B next to each decrypted email address. What is the best way to do this?
I have read the answer here, but it doesn't exactly work
I have minimal experience with google spreadsheets :-(
I began by using this script, but could only encrypt one email at a time
function MD5 (input) {
var rawHash = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, input);
var txtHash = '';
for (i = 0; i < rawHash.length; i++) {
var hashVal = rawHash[i];
if (hashVal < 0) {
hashVal += 256;
}
if (hashVal.toString(16).length == 1) {
txtHash += '0';
}
txtHash += hashVal.toString(16);
}
return txtHash;
}