public class Ecies extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
AESBlockLength |
static int |
AESKeyLength |
static int |
HMACKeyLength |
static int |
IVLength |
static int |
MACBYTELENGTH |
| 构造器和说明 |
|---|
Ecies() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decryptText(byte[] cipher,
String secret) |
static byte[] |
eciesDecrypt(byte[] cipherText,
byte[] privateKey) |
static byte[] |
eciesDecrypt(String cipherHex,
String privateKey) |
static byte[] |
eciesEncrypt(byte[] plainBytes,
byte[] publicKey) |
static byte[] |
encryptText(String plainText,
List<String> listPublicKey)
encrypt text with a publickey list,the cipher can be decrypted
by every secret whose publickey is in this list.
|
static byte[] |
simpleDecrypt(byte[] cipherText,
byte[] priv,
byte[] dataPubA) |
public static final int AESKeyLength
public static final int AESBlockLength
public static final int HMACKeyLength
public static final int IVLength
public static final int MACBYTELENGTH
public static byte[] encryptText(String plainText, List<String> listPublicKey)
plainText - plainTextlistPublicKey - listPublicKeypublic static byte[] simpleDecrypt(byte[] cipherText,
byte[] priv,
byte[] dataPubA)
public static byte[] eciesEncrypt(byte[] plainBytes,
byte[] publicKey)
plainBytes - bytes to be encrypted.publicKey - publickey bytes.public static byte[] eciesDecrypt(String cipherHex, String privateKey) throws Exception
cipherHex - cipherHex.privateKey - privateKeyException - Exception throws.Copyright © 2021. All rights reserved.