t

play.api.libs.crypto

CookieSigner

trait CookieSigner extends AnyRef

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

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

Source
CookieSigner.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieSigner
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract 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.

    message

    The message to sign.

    returns

    A hexadecimal encoded signature.

  2. abstract 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.

    message

    The message to sign.

    key

    The private key to sign with.

    returns

    A hexadecimal encoded signature.

Concrete Value Members

  1. def asJava: libs.crypto.CookieSigner

    returns

    the Java version for this cookie signer.