- hashMatches
Compare the given hash and the given string-to-hash to see if they are equal.
The string-to-hash is
- decrypt
decrypt text to a string with specific initVector and secretKey; rarely used
except in testing and w
- encodeString
/ This method will hash strToEncode using the preferred algorithm. Currently,
OpenMRS's preferred al
- encrypt
encrypt text to a string with specific initVector and secretKey; rarely used
except in testing and w
- getRandomToken
This method will generate a random string
- encodeStringSHA1
This method will hash strToEncode using the old SHA-1 algorithm.
- generateNewInitVector
generate a new cipher initialization vector; should only be called once in order
to not invalidate a
- generateNewSecretKey
generate a new secret key; should only be called once in order to not invalidate
all encrypted data
- getPasswordEncodeFailMessage
Gets the error message for failing to encode password when the given algorithm
was not found
- getSavedSecretKey
retrieve the secret key from runtime properties
- hexString
Convenience method to convert a byte array to a string
- incorrectHexString
This method used to be the simple hexString method, however, as pointed out in
ticket http://dev.ope