public interface OtrCryptoEngine
| Modifier and Type | Field and Description |
|---|---|
static int |
AES_KEY_BYTE_LENGTH |
static BigInteger |
BIGINTEGER_TWO |
static int |
DH_PRIVATE_KEY_MINIMUM_BIT_LENGTH |
static int |
DSA_PUB_TYPE |
static BigInteger |
GENERATOR |
static String |
GENERATOR_TEXT |
static BigInteger |
MODULUS |
static BigInteger |
MODULUS_MINUS_TWO |
static String |
MODULUS_TEXT |
static int |
SHA256_HMAC_KEY_BYTE_LENGTH |
static byte[] |
ZERO_CTR |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
aesDecrypt(byte[] key,
byte[] ctr,
byte[] b) |
byte[] |
aesEncrypt(byte[] key,
byte[] ctr,
byte[] b) |
KeyPair |
generateDHKeyPair() |
BigInteger |
generateSecret(PrivateKey privKey,
PublicKey pubKey) |
DHPublicKey |
getDHPublicKey(BigInteger mpi) |
DHPublicKey |
getDHPublicKey(byte[] mpiBytes) |
String |
getFingerprint(PublicKey pubKey) |
byte[] |
getFingerprintRaw(PublicKey pubKey) |
byte[] |
sha1Hash(byte[] b) |
byte[] |
sha1Hmac(byte[] b,
byte[] key,
int length) |
byte[] |
sha256Hash(byte[] b) |
byte[] |
sha256Hmac(byte[] b,
byte[] key) |
byte[] |
sha256Hmac(byte[] b,
byte[] key,
int length) |
byte[] |
sha256Hmac160(byte[] b,
byte[] key) |
byte[] |
sign(byte[] b,
PrivateKey privatekey) |
boolean |
verify(byte[] b,
PublicKey pubKey,
byte[] rs) |
static final String MODULUS_TEXT
static final BigInteger MODULUS
static final BigInteger BIGINTEGER_TWO
static final BigInteger MODULUS_MINUS_TWO
static final String GENERATOR_TEXT
static final BigInteger GENERATOR
static final int AES_KEY_BYTE_LENGTH
static final int SHA256_HMAC_KEY_BYTE_LENGTH
static final int DH_PRIVATE_KEY_MINIMUM_BIT_LENGTH
static final byte[] ZERO_CTR
static final int DSA_PUB_TYPE
KeyPair generateDHKeyPair() throws OtrCryptoException
OtrCryptoExceptionDHPublicKey getDHPublicKey(byte[] mpiBytes) throws OtrCryptoException
OtrCryptoExceptionDHPublicKey getDHPublicKey(BigInteger mpi) throws OtrCryptoException
OtrCryptoExceptionbyte[] sha256Hmac(byte[] b,
byte[] key)
throws OtrCryptoException
OtrCryptoExceptionbyte[] sha256Hmac(byte[] b,
byte[] key,
int length)
throws OtrCryptoException
OtrCryptoExceptionbyte[] sha1Hmac(byte[] b,
byte[] key,
int length)
throws OtrCryptoException
OtrCryptoExceptionbyte[] sha256Hmac160(byte[] b,
byte[] key)
throws OtrCryptoException
OtrCryptoExceptionbyte[] sha256Hash(byte[] b)
throws OtrCryptoException
OtrCryptoExceptionbyte[] sha1Hash(byte[] b)
throws OtrCryptoException
OtrCryptoExceptionbyte[] aesDecrypt(byte[] key,
byte[] ctr,
byte[] b)
throws OtrCryptoException
OtrCryptoExceptionbyte[] aesEncrypt(byte[] key,
byte[] ctr,
byte[] b)
throws OtrCryptoException
OtrCryptoExceptionBigInteger generateSecret(PrivateKey privKey, PublicKey pubKey) throws OtrCryptoException
OtrCryptoExceptionbyte[] sign(byte[] b,
PrivateKey privatekey)
throws OtrCryptoException
OtrCryptoExceptionboolean verify(byte[] b,
PublicKey pubKey,
byte[] rs)
throws OtrCryptoException
OtrCryptoExceptionString getFingerprint(PublicKey pubKey) throws OtrCryptoException
OtrCryptoExceptionbyte[] getFingerprintRaw(PublicKey pubKey) throws OtrCryptoException
OtrCryptoExceptionCopyright © 2015. All rights reserved.