net.java.otr4j.crypto
Interface OtrCryptoEngine
- All Known Implementing Classes:
- OtrCryptoEngineImpl
public interface OtrCryptoEngine
|
Method Summary |
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[] |
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)
|
MODULUS_TEXT
static final String MODULUS_TEXT
- See Also:
- Constant Field Values
MODULUS
static final BigInteger MODULUS
BIGINTEGER_TWO
static final BigInteger BIGINTEGER_TWO
MODULUS_MINUS_TWO
static final BigInteger MODULUS_MINUS_TWO
GENERATOR_TEXT
static final String GENERATOR_TEXT
- See Also:
- Constant Field Values
GENERATOR
static final BigInteger GENERATOR
AES_KEY_BYTE_LENGTH
static final int AES_KEY_BYTE_LENGTH
- See Also:
- Constant Field Values
SHA256_HMAC_KEY_BYTE_LENGTH
static final int SHA256_HMAC_KEY_BYTE_LENGTH
- See Also:
- Constant Field Values
DH_PRIVATE_KEY_MINIMUM_BIT_LENGTH
static final int DH_PRIVATE_KEY_MINIMUM_BIT_LENGTH
- See Also:
- Constant Field Values
ZERO_CTR
static final byte[] ZERO_CTR
DSA_PUB_TYPE
static final int DSA_PUB_TYPE
- See Also:
- Constant Field Values
generateDHKeyPair
KeyPair generateDHKeyPair()
throws OtrCryptoException
- Throws:
OtrCryptoException
getDHPublicKey
DHPublicKey getDHPublicKey(byte[] mpiBytes)
throws OtrCryptoException
- Throws:
OtrCryptoException
getDHPublicKey
DHPublicKey getDHPublicKey(BigInteger mpi)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha256Hmac
byte[] sha256Hmac(byte[] b,
byte[] key)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha256Hmac
byte[] sha256Hmac(byte[] b,
byte[] key,
int length)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha1Hmac
byte[] sha1Hmac(byte[] b,
byte[] key,
int length)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha256Hmac160
byte[] sha256Hmac160(byte[] b,
byte[] key)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha256Hash
byte[] sha256Hash(byte[] b)
throws OtrCryptoException
- Throws:
OtrCryptoException
sha1Hash
byte[] sha1Hash(byte[] b)
throws OtrCryptoException
- Throws:
OtrCryptoException
aesDecrypt
byte[] aesDecrypt(byte[] key,
byte[] ctr,
byte[] b)
throws OtrCryptoException
- Throws:
OtrCryptoException
aesEncrypt
byte[] aesEncrypt(byte[] key,
byte[] ctr,
byte[] b)
throws OtrCryptoException
- Throws:
OtrCryptoException
generateSecret
BigInteger generateSecret(PrivateKey privKey,
PublicKey pubKey)
throws OtrCryptoException
- Throws:
OtrCryptoException
sign
byte[] sign(byte[] b,
PrivateKey privatekey)
throws OtrCryptoException
- Throws:
OtrCryptoException
verify
boolean verify(byte[] b,
PublicKey pubKey,
byte[] rs)
throws OtrCryptoException
- Throws:
OtrCryptoException
getFingerprint
String getFingerprint(PublicKey pubKey)
throws OtrCryptoException
- Throws:
OtrCryptoException
Copyright © 2009 Beem-project.com. All Rights Reserved.