DefaultCookieSigner

play.api.libs.crypto.DefaultCookieSigner
class DefaultCookieSigner(secretConfiguration: SecretConfiguration) extends CookieSigner

Uses an HMAC-SHA1 for signing cookies.

Attributes

Graph
Supertypes
trait CookieSigner
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def sign(message: String, key: Array[Byte]): String

Signs the given String with HMAC-SHA1 using the given key.

Signs the given String with HMAC-SHA1 using the given key.

By default this uses the platform default JSSE provider. This can be overridden by defining play.http.secret.provider in application.conf.

Value parameters

key

The private key to sign with.

message

The message to sign.

Attributes

Returns

A hexadecimal encoded signature.

def sign(message: String): String

Signs the given String with HMAC-SHA1 using the application’s secret key.

Signs the given String with HMAC-SHA1 using the application’s secret key.

By default this uses the platform default JSSE provider. This can be overridden by defining play.http.secret.provider in application.conf.

Value parameters

message

The message to sign.

Attributes

Returns

A hexadecimal encoded signature.

Inherited methods

def asJava: CookieSigner

Attributes

Returns

the Java version for this cookie signer.

Inherited from:
CookieSigner