HashingAlgorithm

sealed trait HashingAlgorithm

Sealed HashingAlgorithm trait to prevent users from shooting themselves in the foot at runtime by specifying a crappy/unsupported algorithm name

The name should be a valid MessageDigest algorithm name.Implementing child classes/objects should refer to this list for proper names:

http://docs.oracle.com/javase/6/docs/technotes/guides/security/StandardNames.html#MessageDigest

class Object
trait Matchable
class Any
object MD5
object SHA1
object SHA256
object SHA512

Value members

Abstract methods

def name: String

Name of the algorithm

Name of the algorithm

Concrete methods

final def messageDigest: MessageDigest

Returns a java.lang.ThreadLocal instance of MessageDigest that implements the hashing algorithm specified by the "name" string.

Returns a java.lang.ThreadLocal instance of MessageDigest that implements the hashing algorithm specified by the "name" string.

Since it is an unshared java.lang.ThreadLocal instance, calling various methods on the java.security.MessageDigest returned by this method is "thread-safe".