public class ECIESCoder
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
KEY_SIZE |
| 构造器和说明 |
|---|
ECIESCoder() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
decrypt(java.math.BigInteger privKey,
byte[] cipher) |
static byte[] |
decrypt(java.math.BigInteger privKey,
byte[] cipher,
byte[] macData) |
static byte[] |
decrypt(org.spongycastle.math.ec.ECPoint ephem,
java.math.BigInteger prv,
byte[] IV,
byte[] cipher,
byte[] macData) |
static byte[] |
decryptSimple(java.math.BigInteger privKey,
byte[] cipher)
Encryption equivalent to the Crypto++ default ECIES ECP settings:
DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOption,0
DL_KeyDerivationAlgorithm: DL_KeyDerivationAlgorithm_P1363 struct ECPPoint,0,class P1363_KDF2 class SHA1
DL_SymmetricEncryptionAlgorithm: DL_EncryptionAlgorithm_Xor class HMAC class SHA1 ,0
DL_PrivateKey: DL_Key ECPPoint
DL_PrivateKey_EC class ECP
Used for Whisper V3
|
static byte[] |
encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext) |
static byte[] |
encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext,
byte[] macData) |
static byte[] |
encryptSimple(org.spongycastle.math.ec.ECPoint pub,
byte[] plaintext)
Encryption equivalent to the Crypto++ default ECIES ECP settings:
DL_KeyAgreementAlgorithm: DL_KeyAgreementAlgorithm_DH struct ECPPoint,struct EnumToType enum CofactorMultiplicationOption,0
DL_KeyDerivationAlgorithm: DL_KeyDerivationAlgorithm_P1363 struct ECPPoint,0,class P1363_KDF2 class SHA1
DL_SymmetricEncryptionAlgorithm: DL_EncryptionAlgorithm_Xor class HMAC class SHA1,0
DL_PrivateKey: DL_Key ECPPoint
DL_PrivateKey_EC class ECP
Used for Whisper V3
|
static int |
getOverhead() |
public static final int KEY_SIZE
public static byte[] decrypt(java.math.BigInteger privKey,
byte[] cipher)
throws java.io.IOException,
org.spongycastle.crypto.InvalidCipherTextException
java.io.IOExceptionorg.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decrypt(java.math.BigInteger privKey,
byte[] cipher,
byte[] macData)
throws java.io.IOException,
org.spongycastle.crypto.InvalidCipherTextException
java.io.IOExceptionorg.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decrypt(org.spongycastle.math.ec.ECPoint ephem,
java.math.BigInteger prv,
byte[] IV,
byte[] cipher,
byte[] macData)
throws org.spongycastle.crypto.InvalidCipherTextException
org.spongycastle.crypto.InvalidCipherTextExceptionpublic static byte[] decryptSimple(java.math.BigInteger privKey,
byte[] cipher)
throws java.io.IOException,
org.spongycastle.crypto.InvalidCipherTextException
privKey - privKeycipher - cipherjava.io.IOException - IOExceptionorg.spongycastle.crypto.InvalidCipherTextException - InvalidCipherTextExceptionpublic static byte[] encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext)
throws org.spongycastle.crypto.InvalidCipherTextException,
java.io.IOException
org.spongycastle.crypto.InvalidCipherTextExceptionjava.io.IOExceptionpublic static byte[] encrypt(org.spongycastle.math.ec.ECPoint toPub,
byte[] plaintext,
byte[] macData)
throws org.spongycastle.crypto.InvalidCipherTextException,
java.io.IOException
org.spongycastle.crypto.InvalidCipherTextExceptionjava.io.IOExceptionpublic static byte[] encryptSimple(org.spongycastle.math.ec.ECPoint pub,
byte[] plaintext)
throws java.io.IOException,
org.spongycastle.crypto.InvalidCipherTextException
pub - pubplaintext - plaintextjava.io.IOException - IOExceptionorg.spongycastle.crypto.InvalidCipherTextException - InvalidCipherTextExceptionpublic static int getOverhead()
Copyright © 2018. All Rights Reserved.