public interface CryptoService
Created by luog on 16/01/14.
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String secret,
byte[] privateKey)
Decrypt a secret using the private key specified
|
String |
decrypt(String secret,
byte[] privateKey,
byte[] salt)
Decrypt a secret using the private key specified along with the salt
|
String |
decrypt(String secret,
String privateKey)
Deprecated.
|
String |
decrypt(String secret,
String privateKey,
String salt)
Deprecated.
|
String |
encrypt(String content,
byte[] privateKey)
Encrypt a String content using private key specified
|
String |
encrypt(String content,
byte[] privateKey,
byte[] salt)
Encrypt a string content using private key specified along with salt
|
String |
encrypt(String content,
String privateKey)
Deprecated.
|
String |
encrypt(String content,
String privateKey,
String salt)
Deprecated.
|
@Deprecated String encrypt(String content, String privateKey) throws Exception
This method is deprecated. Please use encrypt(String, byte[]) instead
Encrypt a String content using private key specified
content - the content to be encryptedprivateKey - the key to encrypt the contentException - when any exception happenedString encrypt(String content, byte[] privateKey) throws Exception
Encrypt a String content using private key specified
content - the content to be encryptedprivateKey - the key to encrypt the contentException - when any exception happened@Deprecated String encrypt(String content, String privateKey, String salt) throws Exception
This method is deprecated. Please use encrypt(String, byte[], byte[]) instead
Encrypt a string content using private key specified along with salt
content - the content to be encryptedprivateKey - the key to encrypt the contentsalt - the salt stringException - when any exception happenedString encrypt(String content, byte[] privateKey, byte[] salt) throws Exception
Encrypt a string content using private key specified along with salt
content - the content to be encryptedprivateKey - the key to encrypt the contentsalt - the salt stringException - when any exception happened@Deprecated String decrypt(String secret, String privateKey) throws Exception
This method is deprecated, please use decrypt(String, byte[]) instead
Decrypt a secret using the private key specified
secret - the encrypted contentprivateKey - the key to decrypt the secretException - when any exception happened@Deprecated String decrypt(String secret, String privateKey, String salt) throws Exception
This method is deprecated, please use decrypt(String, String, String) instead
Decrypt a secret using the private key specified along with the salt
secret - the encrypted contentprivateKey - the key to decrypt the secretsalt - the salt stringException - when any exception happenedString decrypt(String secret, byte[] privateKey) throws Exception
Decrypt a secret using the private key specified
secret - the encrypted contentprivateKey - the key to decrypt the secretException - when any exception happenedString decrypt(String secret, byte[] privateKey, byte[] salt) throws Exception
Decrypt a secret using the private key specified along with the salt
secret - the encrypted contentprivateKey - the key to decrypt the secretsalt - the salt stringException - when any exception happenedCopyright © 2014–2021 OSGL (Open Source General Library). All rights reserved.