public abstract class V1CryptoProvider
extends java.lang.Object
implements net.aholbrook.paseto.crypto.NonceGenerator
| Modifier and Type | Field and Description |
|---|---|
protected static java.math.BigInteger |
E |
protected static int |
HKDF_LEN |
static int |
HKDF_SALT_LEN |
static int |
NONCE_SIZE |
protected static int |
RSA_KEY_SIZE |
static int |
RSA_SIGNATURE_LEN |
static int |
SHA384_OUT_LEN |
| Constructor and Description |
|---|
V1CryptoProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract byte[] |
aes256CtrDecrypt(byte[] c,
byte[] key,
byte[] iv) |
abstract byte[] |
aes256CtrEncrypt(byte[] m,
byte[] key,
byte[] iv) |
byte[] |
generateNonce() |
net.aholbrook.paseto.crypto.NonceGenerator |
getNonceGenerator() |
abstract byte[] |
hkdfExtractAndExpand(byte[] salt,
byte[] inputKeyingMaterial,
byte[] info) |
abstract byte[] |
hmacSha384(byte[] m,
byte[] key) |
abstract byte[] |
randomBytes(int size) |
abstract net.aholbrook.paseto.crypto.KeyPair |
rsaGenerate() |
abstract byte[] |
rsaSign(byte[] m,
byte[] privateKey) |
abstract boolean |
rsaVerify(byte[] m,
byte[] sig,
byte[] publicKey) |
protected void |
validateAes256CtrDecrypt(byte[] c,
byte[] key,
byte[] iv) |
protected void |
validateAes256CtrEncrypt(byte[] m,
byte[] key,
byte[] iv) |
protected void |
validateHkdfExtractAndExpand(byte[] salt,
byte[] inputKeyingMaterial,
byte[] info) |
protected void |
validateHmacSha384(byte[] m,
byte[] key) |
protected void |
validateRsaSign(byte[] m,
byte[] privateKey) |
protected void |
validateRsaVerify(byte[] m,
byte[] sig,
byte[] publicKey) |
public static final int NONCE_SIZE
public static final int HKDF_SALT_LEN
public static final int SHA384_OUT_LEN
public static final int RSA_SIGNATURE_LEN
protected static final int HKDF_LEN
protected static final int RSA_KEY_SIZE
protected static final java.math.BigInteger E
public abstract byte[] randomBytes(int size)
public net.aholbrook.paseto.crypto.NonceGenerator getNonceGenerator()
public byte[] generateNonce()
generateNonce in interface net.aholbrook.paseto.crypto.NonceGeneratorpublic abstract byte[] hkdfExtractAndExpand(byte[] salt,
byte[] inputKeyingMaterial,
byte[] info)
public abstract byte[] hmacSha384(byte[] m,
byte[] key)
public abstract byte[] aes256CtrEncrypt(byte[] m,
byte[] key,
byte[] iv)
public abstract byte[] aes256CtrDecrypt(byte[] c,
byte[] key,
byte[] iv)
public abstract byte[] rsaSign(byte[] m,
byte[] privateKey)
public abstract boolean rsaVerify(byte[] m,
byte[] sig,
byte[] publicKey)
public abstract net.aholbrook.paseto.crypto.KeyPair rsaGenerate()
protected final void validateHkdfExtractAndExpand(byte[] salt,
byte[] inputKeyingMaterial,
byte[] info)
protected final void validateHmacSha384(byte[] m,
byte[] key)
protected final void validateAes256CtrEncrypt(byte[] m,
byte[] key,
byte[] iv)
protected final void validateAes256CtrDecrypt(byte[] c,
byte[] key,
byte[] iv)
protected final void validateRsaSign(byte[] m,
byte[] privateKey)
protected final void validateRsaVerify(byte[] m,
byte[] sig,
byte[] publicKey)