public interface AsymmetricEncryptor
Modifier and Type | Method and Description |
---|---|
byte[] |
encrypt(byte[] data,
KeyType keyType)
加密
|
default byte[] |
encrypt(InputStream data,
KeyType keyType)
加密
|
default byte[] |
encrypt(String data,
Charset charset,
KeyType keyType)
加密
|
default byte[] |
encrypt(String data,
KeyType keyType)
加密,使用UTF-8编码
|
default byte[] |
encrypt(String data,
String charset,
KeyType keyType)
加密
|
default String |
encryptBase64(byte[] data,
KeyType keyType)
编码为Base64字符串
|
default String |
encryptBase64(InputStream data,
KeyType keyType)
编码为Base64字符串
|
default String |
encryptBase64(String data,
Charset charset,
KeyType keyType)
编码为Base64字符串
|
default String |
encryptBase64(String data,
KeyType keyType)
编码为Base64字符串,使用UTF-8编码
|
default String |
encryptBcd(String data,
KeyType keyType)
Deprecated.
由于对于ASCII的编码解码有缺陷,且这种BCD实现并不规范,因此会在6.0.0中移除
|
default String |
encryptBcd(String data,
KeyType keyType,
Charset charset)
Deprecated.
由于对于ASCII的编码解码有缺陷,且这种BCD实现并不规范,因此会在6.0.0中移除
|
default String |
encryptHex(byte[] data,
KeyType keyType)
编码为Hex字符串
|
default String |
encryptHex(InputStream data,
KeyType keyType)
编码为Hex字符串
|
default String |
encryptHex(String data,
Charset charset,
KeyType keyType)
编码为Hex字符串
|
default String |
encryptHex(String data,
KeyType keyType)
编码为Hex字符串
|
byte[] encrypt(byte[] data, KeyType keyType)
data
- 被加密的byteskeyType
- 私钥或公钥 KeyType
default String encryptHex(byte[] data, KeyType keyType)
data
- 被加密的byteskeyType
- 私钥或公钥 KeyType
default String encryptBase64(byte[] data, KeyType keyType)
data
- 被加密的byteskeyType
- 私钥或公钥 KeyType
default byte[] encrypt(String data, String charset, KeyType keyType)
data
- 被加密的字符串charset
- 编码keyType
- 私钥或公钥 KeyType
default byte[] encrypt(String data, Charset charset, KeyType keyType)
data
- 被加密的字符串charset
- 编码keyType
- 私钥或公钥 KeyType
default byte[] encrypt(String data, KeyType keyType)
data
- 被加密的字符串keyType
- 私钥或公钥 KeyType
default String encryptHex(String data, KeyType keyType)
data
- 被加密的字符串keyType
- 私钥或公钥 KeyType
default String encryptHex(String data, Charset charset, KeyType keyType)
data
- 被加密的bytescharset
- 编码keyType
- 私钥或公钥 KeyType
default String encryptBase64(String data, KeyType keyType)
data
- 被加密的字符串keyType
- 私钥或公钥 KeyType
default String encryptBase64(String data, Charset charset, KeyType keyType)
data
- 被加密的字符串charset
- 编码keyType
- 私钥或公钥 KeyType
default byte[] encrypt(InputStream data, KeyType keyType) throws IORuntimeException
data
- 被加密的数据流keyType
- 私钥或公钥 KeyType
IORuntimeException
- IO异常default String encryptHex(InputStream data, KeyType keyType)
data
- 被加密的数据流keyType
- 私钥或公钥 KeyType
default String encryptBase64(InputStream data, KeyType keyType)
data
- 被加密的数据流keyType
- 私钥或公钥 KeyType
@Deprecated default String encryptBcd(String data, KeyType keyType)
data
- 数据keyType
- 密钥类型@Deprecated default String encryptBcd(String data, KeyType keyType, Charset charset)
data
- 数据keyType
- 密钥类型charset
- 加密前编码Copyright © 2024. All rights reserved.