decode a String in Base 64
encode a Byte array in Base 64
encode a Byte array in Base 64 in a way that's safe for use in URLs
create a SHA hash from a String
create a SHA hash from a Byte array
create a SHA-256 hash from a String
create a SHA-256 hash from a Byte array
create a SHA hash from a String
create a hex encoded SHA hash from a Byte array
create a hex encoded SHA-256 hash from a Byte array
encode a Byte array as hexadecimal characters
create a MD5 digest from a String
create a MD5 digest from a Byte array
return a random int modulo a number
return a random Long modulo a number
Compare two byte arrays in a way that does not vary if the arrays are determined to be not equal early (test every byte...
Compare two byte arrays in a way that does not vary if the arrays are determined to be not equal early (test every byte... avoids timing attacks
Compare two strings in a way that does not vary if the strings are determined to be not equal early (test every byte...
Compare two strings in a way that does not vary if the strings are determined to be not equal early (test every byte... avoids timing attacks
Provides a secure XML parser, similar to the one provided by
scala.xml.XML
, but with external entities and doctypes disabled and
secure XML processing enabled.
Provides a secure XML parser, similar to the one provided by
scala.xml.XML
, but with external entities and doctypes disabled and
secure XML processing enabled. This prevents XXE (XML External Entities)
attacks, billion laughs attacks, quadratic blowup attacks, and others. It
is used internally throughout Lift, and should be used by anyone who is
parsing XML from an untrusted source.
return true only 'percent' times when asked repeatedly.
return true only 'percent' times when asked repeatedly. This function is used in the Skittr example to get a random set of users
percentage as a double number <= 1.0
The SecurityHelpers trait provides functions to: