|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.libs.Crypto
public class Crypto
Cryptography utils
Nested Class Summary | |
---|---|
static class |
Crypto.HashType
Define a hash type enumeration for strong-typing |
Constructor Summary | |
---|---|
Crypto()
|
Method Summary | |
---|---|
static java.lang.String |
decryptAES(java.lang.String value)
Decrypt a String with the AES encryption standard using the application secret |
static java.lang.String |
decryptAES(java.lang.String value,
java.lang.String privateKey)
Decrypt a String with the AES encryption standard. |
static java.lang.String |
encryptAES(java.lang.String value)
Encrypt a String with the AES encryption standard using the application secret |
static java.lang.String |
encryptAES(java.lang.String value,
java.lang.String privateKey)
Encrypt a String with the AES encryption standard. |
static java.lang.String |
passwordHash(java.lang.String input)
Create a password hash using the default hashing algorithm |
static java.lang.String |
passwordHash(java.lang.String input,
Crypto.HashType hashType)
Create a password hash using specific hashing algorithm |
static java.lang.String |
sign(java.lang.String message)
Sign a message using the application secret key (HMAC-SHA1) |
static java.lang.String |
sign(java.lang.String message,
byte[] key)
Sign a message with a key |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Crypto()
Method Detail |
---|
public static java.lang.String sign(java.lang.String message)
public static java.lang.String sign(java.lang.String message, byte[] key)
message
- The message to signkey
- The key to use
java.lang.Exception
public static java.lang.String passwordHash(java.lang.String input)
input
- The password
public static java.lang.String passwordHash(java.lang.String input, Crypto.HashType hashType)
input
- The passwordhashType
- The hashing algorithm
public static java.lang.String encryptAES(java.lang.String value)
value
- The String to encrypt
public static java.lang.String encryptAES(java.lang.String value, java.lang.String privateKey)
value
- The String to encryptprivateKey
- The key used to encrypt
public static java.lang.String decryptAES(java.lang.String value)
value
- An hexadecimal encrypted string
public static java.lang.String decryptAES(java.lang.String value, java.lang.String privateKey)
value
- An hexadecimal encrypted stringprivateKey
- The key used to encrypt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |