Hello Everyone,
I’m trying to create a method called generateHashedPassword() that accepts a string and returns the SHA512 hash of that string. For some reason. the compiler is throwing a syntax error no matter what I try. This is the code I have:
Dim hashedPassword as String
hashedPassword = Crypto.SHA512(password)
return hashedPassword
That throws an error. So I try this:
hashedPassword = str(Crypto.SHA512(password))
return hashedPassword
and it still throws an error.
The example in the docs shows that this might work:
Dim hashedPassword as String
hashedPassword = Crypto.Hash(password, Crypto.Algorithm.SHA512)
return hashedPassword
Doesn’t look like that works. So, I’m stuck… How the heck do I actually hash text using the Crypto API?
Thanks!
Dave