Codecs

play.api.libs.Codecs
object Codecs

Utilities for Codecs operations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Codecs.type

Members list

Value members

Concrete methods

def hexStringToByte(hexString: String): Array[Byte]

Transform an hexadecimal String to a byte array.

Transform an hexadecimal String to a byte array.

Attributes

def md5(bytes: Array[Byte]): String

Computes the MD5 digest for a byte array.

Computes the MD5 digest for a byte array.

Value parameters

bytes

the data to hash

Attributes

Returns

the MD5 digest, encoded as a hex string

def md5(text: String): String

Computes the MD5 digest for a String.

Computes the MD5 digest for a String.

Value parameters

text

the data to hash

Attributes

Returns

the MD5 digest, encoded as a hex string

def sha1(bytes: Array[Byte]): String

Computes the SHA-1 digest for a byte array.

Computes the SHA-1 digest for a byte array.

Value parameters

bytes

the data to hash

Attributes

Returns

the SHA-1 digest, encoded as a hex string

def sha1(text: String): String

Compute the SHA-1 digest for a String.

Compute the SHA-1 digest for a String.

Value parameters

text

the text to hash

Attributes

Returns

the SHA-1 digest, encoded as a hex string

def toHex(array: Array[Byte]): Array[Char]

Converts a byte array into an array of characters that denotes a hexadecimal representation.

Converts a byte array into an array of characters that denotes a hexadecimal representation.

Attributes

def toHexString(array: Array[Byte]): String

Converts a byte array into a String that denotes a hexadecimal representation.

Converts a byte array into a String that denotes a hexadecimal representation.

Attributes