|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectplay.libs.Crypto
public class Crypto
Cryptography utils
嵌套类摘要 | |
---|---|
static class |
Crypto.HashType
Define a hash type enumeration for strong-typing |
构造方法摘要 | |
---|---|
Crypto()
|
方法摘要 | |
---|---|
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 |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public Crypto()
方法详细信息 |
---|
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
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |