Forum Discussion
TracyParish
7 years agoSuper Hero
Ensuring a Random Number is not Re-picked
This one might be for the javascript experts in the community, but open to all.
I think someone (and it might have been Owen Holt) posted how you can use javascript to create a random variable and...
k1967hHayes
6 years agoCommunity Member
Owen and Scott - here is a challenge for you!
I have variable for student names (newName) and I am using some neat code (not mine) to grab a bunch of scores from my (SCORM 1.2) file to record results in a Google Sheet
Now I want to record the student name in the file too - but I want to encrypt the name so others can't determine whose score is whose.
The encryption doesn't need to to be very strong - a Ceasar Cipher or something of that level would be sufficient.
So I need a simple script that takes a text value (newName = "Kevin Hayes" for instance), encrypts it (so it's stored as newNamecode in the Sheet = "ahjdh hjkkh"); but in such a way that I can then decypher it back to plain text as I know the key so I can know whose score is whose.