public class Sodium
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Sodium() |
| Modifier and Type | Method and Description |
|---|---|
int |
crypto_aead_aes256gcm_beforenm(AEAD.StateAES state,
byte[] key) |
int |
crypto_aead_aes256gcm_decrypt_afternm(byte[] message,
long[] messageLength,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
AEAD.StateAES state) |
int |
crypto_aead_aes256gcm_decrypt_detached_afternm(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
AEAD.StateAES state) |
int |
crypto_aead_aes256gcm_decrypt_detached(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key) |
int |
crypto_aead_aes256gcm_decrypt(byte[] message,
long[] messageLen,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key) |
int |
crypto_aead_aes256gcm_encrypt_afternm(byte[] cipher,
long[] cipherLength,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
AEAD.StateAES state) |
int |
crypto_aead_aes256gcm_encrypt_detached_afternm(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
AEAD.StateAES state) |
int |
crypto_aead_aes256gcm_encrypt_detached(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key) |
int |
crypto_aead_aes256gcm_encrypt(byte[] cipher,
long[] cipherLen,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key) |
int |
crypto_aead_aes256gcm_is_available() |
void |
crypto_aead_aes256gcm_keygen(byte[] key) |
int |
crypto_aead_chacha20poly1305_decrypt_detached(byte[] m,
byte[] nsec,
byte[] c,
long cLen,
byte[] mac,
byte[] ad,
long adLen,
byte[] npub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_encrypt_detached(byte[] c,
byte[] mac,
long[] macLenAddress,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_ietf_decrypt_detached(byte[] m,
byte[] nSec,
byte[] c,
long cLen,
byte[] mac,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_ietf_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_ietf_encrypt_detached(byte[] c,
byte[] mac,
long[] macLenAddress,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k) |
int |
crypto_aead_chacha20poly1305_ietf_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k) |
void |
crypto_aead_chacha20poly1305_ietf_keygen(byte[] key) |
void |
crypto_aead_chacha20poly1305_keygen(byte[] key) |
int |
crypto_aead_xchacha20poly1305_ietf_decrypt_detached(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key) |
int |
crypto_aead_xchacha20poly1305_ietf_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k) |
int |
crypto_aead_xchacha20poly1305_ietf_encrypt_detached(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key) |
int |
crypto_aead_xchacha20poly1305_ietf_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k) |
void |
crypto_aead_xchacha20poly1305_ietf_keygen(byte[] k) |
int |
crypto_auth_hmacsha256_final(Auth.StateHMAC256 state,
byte[] out) |
int |
crypto_auth_hmacsha256_init(Auth.StateHMAC256 state,
byte[] key,
int keyLen) |
void |
crypto_auth_hmacsha256_keygen(byte[] key) |
int |
crypto_auth_hmacsha256_update(Auth.StateHMAC256 state,
byte[] in,
long inLen) |
int |
crypto_auth_hmacsha256_verify(byte[] h,
byte[] in,
long inLen,
byte[] k) |
int |
crypto_auth_hmacsha256(byte[] out,
byte[] in,
long inLen,
byte[] k) |
int |
crypto_auth_hmacsha512_final(Auth.StateHMAC512 state,
byte[] out) |
int |
crypto_auth_hmacsha512_init(Auth.StateHMAC512 state,
byte[] key,
int keyLen) |
void |
crypto_auth_hmacsha512_keygen(byte[] key) |
int |
crypto_auth_hmacsha512_update(Auth.StateHMAC512 state,
byte[] in,
long inLen) |
int |
crypto_auth_hmacsha512_verify(byte[] h,
byte[] in,
long inLen,
byte[] k) |
int |
crypto_auth_hmacsha512(byte[] out,
byte[] in,
long inLen,
byte[] k) |
int |
crypto_auth_hmacsha512256_final(Auth.StateHMAC512256 state,
byte[] out) |
int |
crypto_auth_hmacsha512256_init(Auth.StateHMAC512256 state,
byte[] key,
int keyLen) |
void |
crypto_auth_hmacsha512256_keygen(byte[] key) |
int |
crypto_auth_hmacsha512256_update(Auth.StateHMAC512256 state,
byte[] in,
long inLen) |
int |
crypto_auth_hmacsha512256_verify(byte[] h,
byte[] in,
long inLen,
byte[] k) |
int |
crypto_auth_hmacsha512256(byte[] out,
byte[] in,
long inLen,
byte[] k) |
void |
crypto_auth_keygen(byte[] k) |
int |
crypto_auth_verify(byte[] tag,
byte[] in,
long inLen,
byte[] key) |
int |
crypto_auth(byte[] tag,
byte[] in,
long inLen,
byte[] key) |
int |
crypto_box_beforenm(byte[] k,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_detached_afternm(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_box_detached(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_easy_afternm(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_box_easy(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_keypair(byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_open_detached_afternm(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] key) |
int |
crypto_box_open_detached(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_open_easy_afternm(byte[] message,
byte[] cipher,
long cLen,
byte[] nonce,
byte[] key) |
int |
crypto_box_open_easy(byte[] message,
byte[] cipherText,
long cipherTextLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_seal_open(byte[] m,
byte[] cipher,
long cipherLen,
byte[] publicKey,
byte[] secretKey) |
int |
crypto_box_seal(byte[] cipher,
byte[] message,
long messageLen,
byte[] publicKey) |
int |
crypto_box_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed) |
int |
crypto_core_hchacha20(byte[] out,
byte[] in,
byte[] k,
byte[] c) |
int |
crypto_generichash_blake2b_salt_personal(byte[] subKey,
int subKeyLen,
byte[] in,
long inLen,
byte[] masterKey,
int masterKeyLen,
byte[] subKeyId,
byte[] context) |
int |
crypto_generichash_final(byte[] state,
byte[] out,
int outLen) |
int |
crypto_generichash_init(byte[] state,
byte[] key,
int keyLength,
int outLen) |
void |
crypto_generichash_keygen(byte[] k) |
int |
crypto_generichash_statebytes() |
int |
crypto_generichash_update(byte[] state,
byte[] in,
long inLen) |
int |
crypto_generichash(byte[] out,
int outLen,
byte[] in,
long inLen,
byte[] key,
int keyLen) |
int |
crypto_hash_sha256_final(Hash.State256 state,
byte[] out) |
int |
crypto_hash_sha256_init(Hash.State256 state) |
int |
crypto_hash_sha256_update(Hash.State256 state,
byte[] in,
long inLen) |
int |
crypto_hash_sha256(byte[] out,
byte[] in,
long inLen) |
int |
crypto_hash_sha512_final(Hash.State512 state,
byte[] out) |
int |
crypto_hash_sha512_init(Hash.State512 state) |
int |
crypto_hash_sha512_update(Hash.State512 state,
byte[] in,
long inLen) |
int |
crypto_hash_sha512(byte[] out,
byte[] in,
long inLen) |
int |
crypto_kdf_derive_from_key(byte[] subkey,
int subkeyLen,
long subkeyId,
byte[] context,
byte[] masterKey) |
void |
crypto_kdf_keygen(byte[] masterKey) |
int |
crypto_kx_client_session_keys(byte[] rx,
byte[] tx,
byte[] clientPk,
byte[] clientSk,
byte[] serverPk) |
int |
crypto_kx_keypair(byte[] publicKey,
byte[] secretKey) |
int |
crypto_kx_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed) |
int |
crypto_kx_server_session_keys(byte[] rx,
byte[] tx,
byte[] serverPk,
byte[] serverSk,
byte[] clientPk) |
int |
crypto_pwhash_str_needs_rehash(byte[] hash,
long opsLimit,
com.sun.jna.NativeLong memLimit) |
int |
crypto_pwhash_str_verify(byte[] hash,
byte[] password,
long passwordLen) |
int |
crypto_pwhash_str(byte[] outputStr,
byte[] password,
long passwordLen,
long opsLimit,
com.sun.jna.NativeLong memLimit) |
int |
crypto_pwhash(byte[] outputHash,
long outputHashLen,
byte[] password,
long passwordLen,
byte[] salt,
long opsLimit,
com.sun.jna.NativeLong memLimit,
int alg) |
int |
crypto_scalarmult_base(byte[] publicKey,
byte[] secretKey) |
int |
crypto_scalarmult(byte[] shared,
byte[] secretKey,
byte[] publicKey) |
int |
crypto_secretbox_detached(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_secretbox_easy(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
void |
crypto_secretbox_keygen(byte[] key) |
int |
crypto_secretbox_open_detached(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] key) |
int |
crypto_secretbox_open_easy(byte[] message,
byte[] cipherText,
long cipherTextLen,
byte[] nonce,
byte[] key) |
int |
crypto_secretstream_xchacha20poly1305_abytes() |
int |
crypto_secretstream_xchacha20poly1305_headerbytes() |
int |
crypto_secretstream_xchacha20poly1305_init_pull(SecretStream.State state,
byte[] header,
byte[] key) |
int |
crypto_secretstream_xchacha20poly1305_init_push(SecretStream.State state,
byte[] header,
byte[] key) |
int |
crypto_secretstream_xchacha20poly1305_keybytes() |
void |
crypto_secretstream_xchacha20poly1305_keygen(byte[] key) |
int |
crypto_secretstream_xchacha20poly1305_messagebytes_max() |
int |
crypto_secretstream_xchacha20poly1305_pull(SecretStream.State state,
byte[] message,
long[] messageAddress,
byte[] tagAddress,
byte[] cipher,
long cipherLen,
byte[] additionalData,
long additionalDataLen) |
int |
crypto_secretstream_xchacha20poly1305_push(SecretStream.State state,
byte[] cipher,
long[] cipherAddr,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte tag) |
void |
crypto_secretstream_xchacha20poly1305_rekey(SecretStream.State state) |
byte |
crypto_secretstream_xchacha20poly1305_tag_final() |
byte |
crypto_secretstream_xchacha20poly1305_tag_message() |
byte |
crypto_secretstream_xchacha20poly1305_tag_push() |
byte |
crypto_secretstream_xchacha20poly1305_tag_rekey() |
int |
crypto_shorthash_keygen(byte[] key) |
int |
crypto_shorthash(byte[] out,
byte[] in,
long inLen,
byte[] key) |
int |
crypto_sign_detached(byte[] signature,
com.sun.jna.Pointer sigLength,
byte[] message,
long messageLen,
byte[] secretKey) |
int |
crypto_sign_ed25519_pk_to_curve25519(byte[] curve25519PublicKey,
byte[] ed25519PublicKey) |
int |
crypto_sign_ed25519_sk_to_curve25519(byte[] curve25519SecretKey,
byte[] ed25519SecretKey) |
int |
crypto_sign_ed25519_sk_to_pk(byte[] ed25519PublicKey,
byte[] ed25519SecretKey) |
int |
crypto_sign_ed25519_sk_to_seed(byte[] seed,
byte[] ed25519SecretKey) |
int |
crypto_sign_final_create(Sign.StateCryptoSign state,
byte[] sig,
com.sun.jna.Pointer sigLen,
byte[] sk) |
int |
crypto_sign_final_verify(Sign.StateCryptoSign state,
byte[] sig,
byte[] pk) |
int |
crypto_sign_init(Sign.StateCryptoSign state) |
int |
crypto_sign_keypair(byte[] publicKey,
byte[] secretKey) |
int |
crypto_sign_open(byte[] message,
com.sun.jna.Pointer messageLen,
byte[] signedMessage,
long signedMessageLen,
byte[] publicKey) |
int |
crypto_sign_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed) |
int |
crypto_sign_update(Sign.StateCryptoSign state,
byte[] chunk,
long chunkLength) |
int |
crypto_sign_verify_detached(byte[] signature,
byte[] message,
long messageLen,
byte[] publicKey) |
int |
crypto_sign(byte[] signedMessage,
com.sun.jna.Pointer sigLength,
byte[] message,
long messageLen,
byte[] secretKey) |
void |
crypto_stream_chacha20_ietf_keygen(byte[] key) |
int |
crypto_stream_chacha20_ietf_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key) |
int |
crypto_stream_chacha20_ietf_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_stream_chacha20_ietf(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
void |
crypto_stream_chacha20_keygen(byte[] key) |
int |
crypto_stream_chacha20_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key) |
int |
crypto_stream_chacha20_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_stream_chacha20(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
void |
crypto_stream_keygen(byte[] key) |
void |
crypto_stream_salsa20_keygen(byte[] key) |
int |
crypto_stream_salsa20_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key) |
int |
crypto_stream_salsa20_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_stream_salsa20(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
int |
crypto_stream_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
int |
crypto_stream(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
protected void |
onRegistered() |
void |
randombytes_buf_deterministic(byte[] buffer,
int size,
byte[] seed) |
void |
randombytes_buf(byte[] buffer,
int size) |
long |
randombytes_random() |
long |
randombytes_uniform(int upperBound) |
void |
sodium_add(byte[] a,
byte[] b,
int len) |
com.sun.jna.Pointer |
sodium_allocarray(int count,
int size) |
int |
sodium_base64_encoded_len(int binLen,
int variant) |
int |
sodium_base642bin(byte[] bin,
int binMaxLen,
byte[] b64,
int b64Len,
byte[] ignore,
com.sun.jna.Pointer binLen,
com.sun.jna.Pointer b64End,
int variant) |
java.lang.String |
sodium_bin2base64(byte[] b64,
int b64MaxLen,
byte[] bin,
int binLen,
int variant) |
java.lang.String |
sodium_bin2hex(byte[] hex,
int hexMaxLen,
byte[] bin,
int binLen) |
int |
sodium_compare(byte[] b1,
byte[] b2,
int len) |
void |
sodium_free(com.sun.jna.Pointer p) |
int |
sodium_hex2bin(byte[] bin,
int binMaxLen,
byte[] hex,
int hexLen,
byte[] ignore,
com.sun.jna.Pointer binLen,
com.sun.jna.Pointer hexEnd) |
void |
sodium_increment(byte[] n,
int nLen) |
int |
sodium_init() |
int |
sodium_is_zero(byte[] n,
int nLen) |
com.sun.jna.Pointer |
sodium_malloc(int size) |
int |
sodium_memcmp(byte[] b1,
byte[] b2,
int len) |
int |
sodium_memzero(byte[] pnt,
int len) |
int |
sodium_mlock(byte[] addr,
int len) |
int |
sodium_mprotect_noaccess(com.sun.jna.Pointer ptr) |
int |
sodium_mprotect_readonly(com.sun.jna.Pointer ptr) |
int |
sodium_mprotect_readwrite(com.sun.jna.Pointer ptr) |
int |
sodium_munlock(byte[] addr,
int len) |
int |
sodium_pad(com.sun.jna.Pointer paddedBuffLen,
char[] buf,
int unpaddedBufLen,
int blockSize,
int maxBufLen) |
void |
sodium_stackzero(int len) |
int |
sodium_unpad(com.sun.jna.Pointer paddedBuffLen,
char[] buf,
int unpaddedBufLen,
int blockSize) |
protected void onRegistered()
public int sodium_init()
public void sodium_increment(byte[] n,
int nLen)
public void sodium_add(byte[] a,
byte[] b,
int len)
public int sodium_is_zero(byte[] n,
int nLen)
public void sodium_stackzero(int len)
public int sodium_memcmp(byte[] b1,
byte[] b2,
int len)
public int sodium_base64_encoded_len(int binLen,
int variant)
public int sodium_compare(byte[] b1,
byte[] b2,
int len)
public java.lang.String sodium_bin2hex(byte[] hex,
int hexMaxLen,
byte[] bin,
int binLen)
public int sodium_hex2bin(byte[] bin,
int binMaxLen,
byte[] hex,
int hexLen,
byte[] ignore,
com.sun.jna.Pointer binLen,
com.sun.jna.Pointer hexEnd)
public java.lang.String sodium_bin2base64(byte[] b64,
int b64MaxLen,
byte[] bin,
int binLen,
int variant)
public int sodium_base642bin(byte[] bin,
int binMaxLen,
byte[] b64,
int b64Len,
byte[] ignore,
com.sun.jna.Pointer binLen,
com.sun.jna.Pointer b64End,
int variant)
public int sodium_memzero(byte[] pnt,
int len)
public int sodium_mlock(byte[] addr,
int len)
public int sodium_munlock(byte[] addr,
int len)
public com.sun.jna.Pointer sodium_malloc(int size)
public com.sun.jna.Pointer sodium_allocarray(int count,
int size)
public void sodium_free(com.sun.jna.Pointer p)
public int sodium_mprotect_noaccess(com.sun.jna.Pointer ptr)
public int sodium_mprotect_readonly(com.sun.jna.Pointer ptr)
public int sodium_mprotect_readwrite(com.sun.jna.Pointer ptr)
public int sodium_pad(com.sun.jna.Pointer paddedBuffLen,
char[] buf,
int unpaddedBufLen,
int blockSize,
int maxBufLen)
public int sodium_unpad(com.sun.jna.Pointer paddedBuffLen,
char[] buf,
int unpaddedBufLen,
int blockSize)
public long randombytes_random()
public long randombytes_uniform(int upperBound)
public void randombytes_buf(byte[] buffer,
int size)
public void randombytes_buf_deterministic(byte[] buffer,
int size,
byte[] seed)
public int crypto_pwhash(byte[] outputHash,
long outputHashLen,
byte[] password,
long passwordLen,
byte[] salt,
long opsLimit,
com.sun.jna.NativeLong memLimit,
int alg)
public int crypto_pwhash_str(byte[] outputStr,
byte[] password,
long passwordLen,
long opsLimit,
com.sun.jna.NativeLong memLimit)
public int crypto_pwhash_str_verify(byte[] hash,
byte[] password,
long passwordLen)
public int crypto_pwhash_str_needs_rehash(byte[] hash,
long opsLimit,
com.sun.jna.NativeLong memLimit)
public int crypto_hash_sha256(byte[] out,
byte[] in,
long inLen)
public int crypto_hash_sha512(byte[] out,
byte[] in,
long inLen)
public int crypto_hash_sha256_init(Hash.State256 state)
public int crypto_hash_sha256_update(Hash.State256 state, byte[] in, long inLen)
public int crypto_hash_sha256_final(Hash.State256 state, byte[] out)
public int crypto_hash_sha512_init(Hash.State512 state)
public int crypto_hash_sha512_update(Hash.State512 state, byte[] in, long inLen)
public int crypto_hash_sha512_final(Hash.State512 state, byte[] out)
public void crypto_kdf_keygen(byte[] masterKey)
public int crypto_kdf_derive_from_key(byte[] subkey,
int subkeyLen,
long subkeyId,
byte[] context,
byte[] masterKey)
public int crypto_kx_keypair(byte[] publicKey,
byte[] secretKey)
public int crypto_kx_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
public int crypto_kx_client_session_keys(byte[] rx,
byte[] tx,
byte[] clientPk,
byte[] clientSk,
byte[] serverPk)
public int crypto_kx_server_session_keys(byte[] rx,
byte[] tx,
byte[] serverPk,
byte[] serverSk,
byte[] clientPk)
public void crypto_secretbox_keygen(byte[] key)
public int crypto_secretbox_easy(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_secretbox_open_easy(byte[] message,
byte[] cipherText,
long cipherTextLen,
byte[] nonce,
byte[] key)
public int crypto_secretbox_detached(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_secretbox_open_detached(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] key)
public int crypto_box_keypair(byte[] publicKey,
byte[] secretKey)
public int crypto_box_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
public int crypto_box_easy(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey)
public int crypto_box_open_easy(byte[] message,
byte[] cipherText,
long cipherTextLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey)
public int crypto_box_detached(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey)
public int crypto_box_open_detached(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] publicKey,
byte[] secretKey)
public int crypto_box_beforenm(byte[] k,
byte[] publicKey,
byte[] secretKey)
public int crypto_box_easy_afternm(byte[] cipherText,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_box_open_easy_afternm(byte[] message,
byte[] cipher,
long cLen,
byte[] nonce,
byte[] key)
public int crypto_box_detached_afternm(byte[] cipherText,
byte[] mac,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_box_open_detached_afternm(byte[] message,
byte[] cipherText,
byte[] mac,
long cipherTextLen,
byte[] nonce,
byte[] key)
public int crypto_box_seal(byte[] cipher,
byte[] message,
long messageLen,
byte[] publicKey)
public int crypto_box_seal_open(byte[] m,
byte[] cipher,
long cipherLen,
byte[] publicKey,
byte[] secretKey)
public int crypto_sign_init(Sign.StateCryptoSign state)
public int crypto_sign_update(Sign.StateCryptoSign state, byte[] chunk, long chunkLength)
public int crypto_sign_final_create(Sign.StateCryptoSign state, byte[] sig, com.sun.jna.Pointer sigLen, byte[] sk)
public int crypto_sign_final_verify(Sign.StateCryptoSign state, byte[] sig, byte[] pk)
public int crypto_sign_keypair(byte[] publicKey,
byte[] secretKey)
public int crypto_sign_seed_keypair(byte[] publicKey,
byte[] secretKey,
byte[] seed)
public int crypto_sign(byte[] signedMessage,
com.sun.jna.Pointer sigLength,
byte[] message,
long messageLen,
byte[] secretKey)
public int crypto_sign_open(byte[] message,
com.sun.jna.Pointer messageLen,
byte[] signedMessage,
long signedMessageLen,
byte[] publicKey)
public int crypto_sign_detached(byte[] signature,
com.sun.jna.Pointer sigLength,
byte[] message,
long messageLen,
byte[] secretKey)
public int crypto_sign_verify_detached(byte[] signature,
byte[] message,
long messageLen,
byte[] publicKey)
public int crypto_sign_ed25519_pk_to_curve25519(byte[] curve25519PublicKey,
byte[] ed25519PublicKey)
public int crypto_sign_ed25519_sk_to_curve25519(byte[] curve25519SecretKey,
byte[] ed25519SecretKey)
public int crypto_sign_ed25519_sk_to_seed(byte[] seed,
byte[] ed25519SecretKey)
public int crypto_sign_ed25519_sk_to_pk(byte[] ed25519PublicKey,
byte[] ed25519SecretKey)
public void crypto_secretstream_xchacha20poly1305_keygen(byte[] key)
public int crypto_secretstream_xchacha20poly1305_init_push(SecretStream.State state, byte[] header, byte[] key)
public int crypto_secretstream_xchacha20poly1305_push(SecretStream.State state, byte[] cipher, long[] cipherAddr, byte[] message, long messageLen, byte[] additionalData, long additionalDataLen, byte tag)
public int crypto_secretstream_xchacha20poly1305_init_pull(SecretStream.State state, byte[] header, byte[] key)
public int crypto_secretstream_xchacha20poly1305_pull(SecretStream.State state, byte[] message, long[] messageAddress, byte[] tagAddress, byte[] cipher, long cipherLen, byte[] additionalData, long additionalDataLen)
public void crypto_secretstream_xchacha20poly1305_rekey(SecretStream.State state)
public int crypto_secretstream_xchacha20poly1305_abytes()
public int crypto_secretstream_xchacha20poly1305_headerbytes()
public int crypto_secretstream_xchacha20poly1305_keybytes()
public int crypto_secretstream_xchacha20poly1305_messagebytes_max()
public byte crypto_secretstream_xchacha20poly1305_tag_message()
public byte crypto_secretstream_xchacha20poly1305_tag_push()
public byte crypto_secretstream_xchacha20poly1305_tag_rekey()
public byte crypto_secretstream_xchacha20poly1305_tag_final()
public void crypto_stream_chacha20_keygen(byte[] key)
public int crypto_stream_chacha20(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
public int crypto_stream_chacha20_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_stream_chacha20_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key)
public void crypto_stream_chacha20_ietf_keygen(byte[] key)
public int crypto_stream_chacha20_ietf(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
public int crypto_stream_chacha20_ietf_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_stream_chacha20_ietf_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key)
public void crypto_stream_salsa20_keygen(byte[] key)
public int crypto_stream_salsa20(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
public int crypto_stream_salsa20_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_stream_salsa20_xor_ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key)
public void crypto_stream_keygen(byte[] key)
public int crypto_stream(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
public int crypto_stream_xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
public int crypto_scalarmult_base(byte[] publicKey,
byte[] secretKey)
public int crypto_scalarmult(byte[] shared,
byte[] secretKey,
byte[] publicKey)
public int crypto_auth(byte[] tag,
byte[] in,
long inLen,
byte[] key)
public int crypto_auth_verify(byte[] tag,
byte[] in,
long inLen,
byte[] key)
public void crypto_auth_keygen(byte[] k)
public void crypto_auth_hmacsha256_keygen(byte[] key)
public int crypto_auth_hmacsha256(byte[] out,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha256_verify(byte[] h,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha256_init(Auth.StateHMAC256 state, byte[] key, int keyLen)
public int crypto_auth_hmacsha256_update(Auth.StateHMAC256 state, byte[] in, long inLen)
public int crypto_auth_hmacsha256_final(Auth.StateHMAC256 state, byte[] out)
public void crypto_auth_hmacsha512256_keygen(byte[] key)
public int crypto_auth_hmacsha512256(byte[] out,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha512256_verify(byte[] h,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha512256_init(Auth.StateHMAC512256 state, byte[] key, int keyLen)
public int crypto_auth_hmacsha512256_update(Auth.StateHMAC512256 state, byte[] in, long inLen)
public int crypto_auth_hmacsha512256_final(Auth.StateHMAC512256 state, byte[] out)
public void crypto_auth_hmacsha512_keygen(byte[] key)
public int crypto_auth_hmacsha512(byte[] out,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha512_verify(byte[] h,
byte[] in,
long inLen,
byte[] k)
public int crypto_auth_hmacsha512_init(Auth.StateHMAC512 state, byte[] key, int keyLen)
public int crypto_auth_hmacsha512_update(Auth.StateHMAC512 state, byte[] in, long inLen)
public int crypto_auth_hmacsha512_final(Auth.StateHMAC512 state, byte[] out)
public int crypto_shorthash(byte[] out,
byte[] in,
long inLen,
byte[] key)
public int crypto_shorthash_keygen(byte[] key)
public void crypto_generichash_keygen(byte[] k)
public int crypto_generichash(byte[] out,
int outLen,
byte[] in,
long inLen,
byte[] key,
int keyLen)
public int crypto_generichash_init(byte[] state,
byte[] key,
int keyLength,
int outLen)
public int crypto_generichash_update(byte[] state,
byte[] in,
long inLen)
public int crypto_generichash_final(byte[] state,
byte[] out,
int outLen)
public int crypto_generichash_statebytes()
public int crypto_generichash_blake2b_salt_personal(byte[] subKey,
int subKeyLen,
byte[] in,
long inLen,
byte[] masterKey,
int masterKeyLen,
byte[] subKeyId,
byte[] context)
public int crypto_core_hchacha20(byte[] out,
byte[] in,
byte[] k,
byte[] c)
public void crypto_aead_chacha20poly1305_keygen(byte[] key)
public int crypto_aead_chacha20poly1305_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_encrypt_detached(byte[] c,
byte[] mac,
long[] macLenAddress,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_decrypt_detached(byte[] m,
byte[] nsec,
byte[] c,
long cLen,
byte[] mac,
byte[] ad,
long adLen,
byte[] npub,
byte[] k)
public void crypto_aead_chacha20poly1305_ietf_keygen(byte[] key)
public int crypto_aead_chacha20poly1305_ietf_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_ietf_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_ietf_encrypt_detached(byte[] c,
byte[] mac,
long[] macLenAddress,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k)
public int crypto_aead_chacha20poly1305_ietf_decrypt_detached(byte[] m,
byte[] nSec,
byte[] c,
long cLen,
byte[] mac,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k)
public void crypto_aead_xchacha20poly1305_ietf_keygen(byte[] k)
public int crypto_aead_xchacha20poly1305_ietf_encrypt(byte[] c,
long[] cLen,
byte[] m,
long mLen,
byte[] ad,
long adLen,
byte[] nSec,
byte[] nPub,
byte[] k)
public int crypto_aead_xchacha20poly1305_ietf_decrypt(byte[] m,
long[] mLen,
byte[] nSec,
byte[] c,
long cLen,
byte[] ad,
long adLen,
byte[] nPub,
byte[] k)
public int crypto_aead_xchacha20poly1305_ietf_encrypt_detached(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key)
public int crypto_aead_xchacha20poly1305_ietf_decrypt_detached(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key)
public void crypto_aead_aes256gcm_keygen(byte[] key)
public int crypto_aead_aes256gcm_encrypt(byte[] cipher,
long[] cipherLen,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key)
public int crypto_aead_aes256gcm_decrypt(byte[] message,
long[] messageLen,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key)
public int crypto_aead_aes256gcm_encrypt_detached(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
byte[] key)
public int crypto_aead_aes256gcm_decrypt_detached(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
byte[] key)
public int crypto_aead_aes256gcm_beforenm(AEAD.StateAES state, byte[] key)
public int crypto_aead_aes256gcm_encrypt_afternm(byte[] cipher,
long[] cipherLength,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
AEAD.StateAES state)
public int crypto_aead_aes256gcm_decrypt_afternm(byte[] message,
long[] messageLength,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
AEAD.StateAES state)
public int crypto_aead_aes256gcm_encrypt_detached_afternm(byte[] cipher,
byte[] mac,
long[] macLenAddress,
byte[] message,
long messageLen,
byte[] additionalData,
long additionalDataLen,
byte[] nSec,
byte[] nPub,
AEAD.StateAES state)
public int crypto_aead_aes256gcm_decrypt_detached_afternm(byte[] message,
byte[] nSec,
byte[] cipher,
long cipherLen,
byte[] mac,
byte[] additionalData,
long additionalDataLen,
byte[] nPub,
AEAD.StateAES state)
public int crypto_aead_aes256gcm_is_available()