Package play.libs.crypto
Class DefaultCookieSigner
- Object
-
- play.libs.crypto.DefaultCookieSigner
-
- All Implemented Interfaces:
CookieSigner
@Singleton public class DefaultCookieSigner extends Object implements CookieSigner
This class delegates to the Scala CookieSigner.
-
-
Constructor Summary
Constructors Constructor Description DefaultCookieSigner(play.api.libs.crypto.CookieSigner signer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description play.api.libs.crypto.CookieSigner
asScala()
String
sign(String message)
Signs the given String using the application's secret key.String
sign(String message, byte[] key)
Signs the given String using the given key.
-
-
-
Method Detail
-
sign
public String sign(String message)
Signs the given String using the application's secret key.- Specified by:
sign
in interfaceCookieSigner
- Parameters:
message
- The message to sign.- Returns:
- A hexadecimal encoded signature.
-
sign
public String sign(String message, byte[] key)
Signs the given String using the given key.- Specified by:
sign
in interfaceCookieSigner
- Parameters:
message
- The message to sign.key
- The private key to sign with.- Returns:
- A hexadecimal encoded signature.
-
asScala
public play.api.libs.crypto.CookieSigner asScala()
- Specified by:
asScala
in interfaceCookieSigner
- Returns:
- The Scala version for this cookie signer.
-
-