public class ECIES extends AsymmetricCrypto
详细介绍见:https://blog.csdn.net/baidu_26954729/article/details/90437344 此算法必须引入Bouncy Castle库
cipher, decryptBlockSize, encryptBlockSize
algorithm, lock, privateKey, publicKey
Constructor and Description |
---|
ECIES()
构造,生成新的私钥公钥对
|
ECIES(byte[] privateKey,
byte[] publicKey)
构造
私钥和公钥同时为空时生成一对新的私钥和公钥 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 |
ECIES(KeyPair keyPair)
构造
私钥和公钥同时为空时生成一对新的私钥和公钥 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 |
ECIES(String eciesAlgorithm)
构造,生成新的私钥公钥对
|
ECIES(String eciesAlgorithm,
KeyPair keyPair)
构造
私钥和公钥同时为空时生成一对新的私钥和公钥 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 |
ECIES(String privateKeyStr,
String publicKeyStr)
构造
私钥和公钥同时为空时生成一对新的私钥和公钥 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 |
ECIES(String eciesAlgorithm,
String privateKeyStr,
String publicKeyStr)
构造
私钥和公钥同时为空时生成一对新的私钥和公钥 私钥和公钥可以单独传入一个,如此则只能使用此钥匙来做加密或者解密 |
decrypt, encrypt, getAlgorithmParameterSpec, getCipher, getDecryptBlockSize, getEncryptBlockSize, init, initCipher, setAlgorithmParameterSpec, setDecryptBlockSize, setEncryptBlockSize, setRandom
getKeyByType, getPrivateKey, getPrivateKeyBase64, getPublicKey, getPublicKeyBase64, initKeys, setKey, setLock, setPrivateKey, setPublicKey
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
encrypt, encrypt, encrypt, encryptBase64, encryptBase64, encryptBase64, encryptBase64, encryptHex, encryptHex, encryptHex, encryptHex
decrypt, decrypt, decryptStr, decryptStr
public ECIES()
public ECIES(String eciesAlgorithm)
eciesAlgorithm
- 自定义ECIES算法,例如ECIESwithDESede/NONE/PKCS7Paddingpublic ECIES(String privateKeyStr, String publicKeyStr)
privateKeyStr
- 私钥Hex或Base64表示publicKeyStr
- 公钥Hex或Base64表示public ECIES(String eciesAlgorithm, String privateKeyStr, String publicKeyStr)
eciesAlgorithm
- 自定义ECIES算法,例如ECIESwithDESede/NONE/PKCS7PaddingprivateKeyStr
- 私钥Hex或Base64表示publicKeyStr
- 公钥Hex或Base64表示public ECIES(byte[] privateKey, byte[] publicKey)
privateKey
- 私钥publicKey
- 公钥public ECIES(KeyPair keyPair)
keyPair
- 密钥对,null
表示随机生成Copyright © 2025. All rights reserved.