public abstract class V2CryptoProvider
extends java.lang.Object
implements net.aholbrook.paseto.crypto.NonceGenerator
| Modifier and Type | Field and Description |
|---|---|
static int |
BLAKE2B_BYTES_MAX |
static int |
BLAKE2B_BYTES_MIN |
static int |
BLAKE2B_KEYBYTES_MAX |
static int |
BLAKE2B_KEYBYTES_MIN |
static int |
ED25519_BYTES |
static int |
ED25519_PUBLICKEYBYTES |
static int |
ED25519_SECRETKEYBYTES |
static int |
XCHACHA20_POLY1305_IETF_ABYTES |
static int |
XCHACHA20_POLY1305_IETF_NPUBBYTES |
| Constructor and Description |
|---|
V2CryptoProvider() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
aeadXChaCha20Poly1305IetfDecrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key) |
abstract boolean |
aeadXChaCha20Poly1305IetfEncrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key) |
abstract boolean |
blake2b(byte[] out,
byte[] in,
byte[] key) |
abstract net.aholbrook.paseto.crypto.KeyPair |
ed25519Generate() |
abstract boolean |
ed25519Sign(byte[] sig,
byte[] m,
byte[] sk) |
int |
ed25519SignBytes() |
int |
ed25519SignPublicKeyBytes() |
int |
ed25519SignSecretKeyBytes() |
abstract byte[] |
ed25519SkToPk(byte[] sk) |
abstract boolean |
ed25519Verify(byte[] sig,
byte[] m,
byte[] pk) |
byte[] |
generateNonce() |
net.aholbrook.paseto.crypto.NonceGenerator |
getNonceGenerator() |
abstract byte[] |
randomBytes(int size) |
protected void |
validateAeadXChaCha20Poly1305IetfDecrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key) |
protected void |
validateAeadXChaCha20Poly1305IetfEncrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key) |
protected void |
validateBlake2b(byte[] out,
byte[] in,
byte[] key) |
protected void |
validateEd25519PublicKey(byte[] sk) |
protected void |
validateEd25519Sign(byte[] sig,
byte[] m,
byte[] sk) |
protected void |
validateEd25519Verify(byte[] sig,
byte[] m,
byte[] pk) |
int |
xChaCha20Poly1305IetfAbytes() |
int |
xChaCha20Poly1305IetfNpubbytes() |
public static final int BLAKE2B_BYTES_MIN
public static final int BLAKE2B_BYTES_MAX
public static final int BLAKE2B_KEYBYTES_MIN
public static final int BLAKE2B_KEYBYTES_MAX
public static final int XCHACHA20_POLY1305_IETF_NPUBBYTES
public static final int XCHACHA20_POLY1305_IETF_ABYTES
public static final int ED25519_BYTES
public static final int ED25519_PUBLICKEYBYTES
public static final int ED25519_SECRETKEYBYTES
public abstract boolean blake2b(byte[] out,
byte[] in,
byte[] key)
public abstract byte[] randomBytes(int size)
public abstract boolean aeadXChaCha20Poly1305IetfEncrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key)
public abstract boolean aeadXChaCha20Poly1305IetfDecrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key)
public abstract boolean ed25519Sign(byte[] sig,
byte[] m,
byte[] sk)
public abstract boolean ed25519Verify(byte[] sig,
byte[] m,
byte[] pk)
public abstract byte[] ed25519SkToPk(byte[] sk)
public abstract net.aholbrook.paseto.crypto.KeyPair ed25519Generate()
public net.aholbrook.paseto.crypto.NonceGenerator getNonceGenerator()
public byte[] generateNonce()
generateNonce in interface net.aholbrook.paseto.crypto.NonceGeneratorpublic int xChaCha20Poly1305IetfNpubbytes()
public int xChaCha20Poly1305IetfAbytes()
public int ed25519SignBytes()
public int ed25519SignPublicKeyBytes()
public int ed25519SignSecretKeyBytes()
protected final void validateBlake2b(byte[] out,
byte[] in,
byte[] key)
protected final void validateAeadXChaCha20Poly1305IetfEncrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key)
protected final void validateAeadXChaCha20Poly1305IetfDecrypt(byte[] out,
byte[] in,
byte[] ad,
byte[] nonce,
byte[] key)
protected final void validateEd25519Sign(byte[] sig,
byte[] m,
byte[] sk)
protected final void validateEd25519Verify(byte[] sig,
byte[] m,
byte[] pk)
protected final void validateEd25519PublicKey(byte[] sk)