CookieSigner

play.api.libs.crypto.CookieSigner
trait CookieSigner

Authenticates a cookie by returning a message authentication code (MAC).

This trait should not be used as a general purpose MAC utility.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

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

Signs (MAC) the given String using the given secret key.

Signs (MAC) the given String using the given secret key.

By default this uses the platform default JCE 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 (MAC) the given String using the application’s secret key.

Signs (MAC) the given String using the application’s secret key.

By default this uses the platform default JCE 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.

Concrete methods

def asJava: CookieSigner

Attributes

Returns

the Java version for this cookie signer.