Package com.codevasp.lazysodium
Class SodiumJava
java.lang.Object
com.codevasp.lazysodium.Sodium
com.codevasp.lazysodium.SodiumJava
-
Field Summary
Fields inherited from class com.codevasp.lazysodium.Sodium
base64Facade -
Constructor Summary
ConstructorsConstructorDescriptionCreates the SodiumJava instance.SodiumJava(LibraryLoader.Mode loadingMode) Creates the SodiumJava using the given loading mode.SodiumJava(String absolutePath) -
Method Summary
Modifier and TypeMethodDescriptionintcrypto_pwhash_scryptsalsa208sha256(byte[] out, long outLen, byte[] password, long passwordLen, byte[] salt, long opsLimit, long memLimit) intcrypto_pwhash_scryptsalsa208sha256_ll(byte[] password, int passwordLen, byte[] salt, int saltLen, long N, long r, long p, byte[] buf, int bufLen) intcrypto_pwhash_scryptsalsa208sha256_str(byte[] out, byte[] password, long passwordLen, long opsLimit, long memLimit) intcrypto_pwhash_scryptsalsa208sha256_str_needs_rehash(byte[] password, long opsLimit, long memLimit) intcrypto_pwhash_scryptsalsa208sha256_str_verify(byte[] str, byte[] password, long passwordLen) intcrypto_stream_salsa2012(byte[] c, long cLen, byte[] nonce, byte[] key) voidcrypto_stream_salsa2012_keygen(byte[] key) intcrypto_stream_salsa2012_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) intcrypto_stream_salsa208(byte[] c, long cLen, byte[] nonce, byte[] key) voidcrypto_stream_salsa208_keygen(byte[] key) intcrypto_stream_salsa208_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) intcrypto_stream_xchacha20(byte[] c, long cLen, byte[] nonce, byte[] key) voidcrypto_stream_xchacha20_keygen(byte[] key) intcrypto_stream_xchacha20_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) intcrypto_stream_xchacha20_xor_ic(byte[] cipher, byte[] message, long messageLen, byte[] nonce, long ic, byte[] key) Methods inherited from class com.codevasp.lazysodium.Sodium
crypto_aead_aes256gcm_beforenm, crypto_aead_aes256gcm_decrypt, crypto_aead_aes256gcm_decrypt_afternm, crypto_aead_aes256gcm_decrypt_detached, crypto_aead_aes256gcm_decrypt_detached_afternm, crypto_aead_aes256gcm_encrypt, crypto_aead_aes256gcm_encrypt_afternm, crypto_aead_aes256gcm_encrypt_detached, crypto_aead_aes256gcm_encrypt_detached_afternm, crypto_aead_aes256gcm_is_available, crypto_aead_aes256gcm_keygen, crypto_aead_chacha20poly1305_decrypt, crypto_aead_chacha20poly1305_decrypt_detached, crypto_aead_chacha20poly1305_encrypt, crypto_aead_chacha20poly1305_encrypt_detached, crypto_aead_chacha20poly1305_ietf_decrypt, crypto_aead_chacha20poly1305_ietf_decrypt_detached, crypto_aead_chacha20poly1305_ietf_encrypt, crypto_aead_chacha20poly1305_ietf_encrypt_detached, crypto_aead_chacha20poly1305_ietf_keygen, crypto_aead_chacha20poly1305_keygen, crypto_aead_xchacha20poly1305_ietf_decrypt, crypto_aead_xchacha20poly1305_ietf_decrypt_detached, crypto_aead_xchacha20poly1305_ietf_encrypt, crypto_aead_xchacha20poly1305_ietf_encrypt_detached, crypto_aead_xchacha20poly1305_ietf_keygen, crypto_auth, crypto_auth_hmacsha256, crypto_auth_hmacsha256_final, crypto_auth_hmacsha256_init, crypto_auth_hmacsha256_keygen, crypto_auth_hmacsha256_update, crypto_auth_hmacsha256_verify, crypto_auth_hmacsha512, crypto_auth_hmacsha512_final, crypto_auth_hmacsha512_init, crypto_auth_hmacsha512_keygen, crypto_auth_hmacsha512_update, crypto_auth_hmacsha512_verify, crypto_auth_hmacsha512256, crypto_auth_hmacsha512256_final, crypto_auth_hmacsha512256_init, crypto_auth_hmacsha512256_keygen, crypto_auth_hmacsha512256_update, crypto_auth_hmacsha512256_verify, crypto_auth_keygen, crypto_auth_verify, crypto_box_beforenm, crypto_box_detached, crypto_box_detached_afternm, crypto_box_easy, crypto_box_easy_afternm, crypto_box_keypair, crypto_box_open_detached, crypto_box_open_detached_afternm, crypto_box_open_easy, crypto_box_open_easy_afternm, crypto_box_seal, crypto_box_seal_open, crypto_box_seed_keypair, crypto_core_hchacha20, crypto_core_ristretto255_add, crypto_core_ristretto255_from_hash, crypto_core_ristretto255_is_valid_point, crypto_core_ristretto255_random, crypto_core_ristretto255_scalar_add, crypto_core_ristretto255_scalar_complement, crypto_core_ristretto255_scalar_invert, crypto_core_ristretto255_scalar_mul, crypto_core_ristretto255_scalar_negate, crypto_core_ristretto255_scalar_random, crypto_core_ristretto255_scalar_reduce, crypto_core_ristretto255_scalar_sub, crypto_core_ristretto255_sub, crypto_generichash, crypto_generichash_blake2b_salt_personal, crypto_generichash_final, crypto_generichash_init, crypto_generichash_keygen, crypto_generichash_statebytes, crypto_generichash_update, crypto_hash_sha256, crypto_hash_sha256_final, crypto_hash_sha256_init, crypto_hash_sha256_update, crypto_hash_sha512, crypto_hash_sha512_final, crypto_hash_sha512_init, crypto_hash_sha512_update, crypto_kdf_derive_from_key, crypto_kdf_keygen, crypto_kx_client_session_keys, crypto_kx_keypair, crypto_kx_seed_keypair, crypto_kx_server_session_keys, crypto_pwhash, crypto_pwhash_str, crypto_pwhash_str_needs_rehash, crypto_pwhash_str_verify, crypto_scalarmult, crypto_scalarmult_base, crypto_scalarmult_ristretto255, crypto_scalarmult_ristretto255_base, crypto_secretbox_detached, crypto_secretbox_easy, crypto_secretbox_keygen, crypto_secretbox_open_detached, crypto_secretbox_open_easy, crypto_secretstream_xchacha20poly1305_abytes, crypto_secretstream_xchacha20poly1305_headerbytes, crypto_secretstream_xchacha20poly1305_init_pull, crypto_secretstream_xchacha20poly1305_init_push, crypto_secretstream_xchacha20poly1305_keybytes, crypto_secretstream_xchacha20poly1305_keygen, crypto_secretstream_xchacha20poly1305_messagebytes_max, crypto_secretstream_xchacha20poly1305_pull, crypto_secretstream_xchacha20poly1305_push, crypto_secretstream_xchacha20poly1305_rekey, crypto_secretstream_xchacha20poly1305_tag_final, crypto_secretstream_xchacha20poly1305_tag_message, crypto_secretstream_xchacha20poly1305_tag_push, crypto_secretstream_xchacha20poly1305_tag_rekey, crypto_shorthash, crypto_shorthash_keygen, crypto_sign, crypto_sign_detached, crypto_sign_ed25519_pk_to_curve25519, crypto_sign_ed25519_sk_to_curve25519, crypto_sign_ed25519_sk_to_pk, crypto_sign_ed25519_sk_to_seed, crypto_sign_final_create, crypto_sign_final_verify, crypto_sign_init, crypto_sign_keypair, crypto_sign_open, crypto_sign_seed_keypair, crypto_sign_update, crypto_sign_verify_detached, crypto_stream, crypto_stream_chacha20, crypto_stream_chacha20_ietf, crypto_stream_chacha20_ietf_keygen, crypto_stream_chacha20_ietf_xor, crypto_stream_chacha20_ietf_xor_ic, crypto_stream_chacha20_keygen, crypto_stream_chacha20_xor, crypto_stream_chacha20_xor_ic, crypto_stream_keygen, crypto_stream_salsa20, crypto_stream_salsa20_keygen, crypto_stream_salsa20_xor, crypto_stream_salsa20_xor_ic, crypto_stream_xor, onRegistered, randombytes_buf, randombytes_buf_deterministic, randombytes_random, randombytes_uniform, sodium_add, sodium_allocarray, sodium_base64_encoded_len, sodium_base642bin, sodium_bin2base64, sodium_bin2hex, sodium_compare, sodium_free, sodium_hex2bin, sodium_increment, sodium_init, sodium_is_zero, sodium_malloc, sodium_memcmp, sodium_memzero, sodium_mlock, sodium_mprotect_noaccess, sodium_mprotect_readonly, sodium_mprotect_readwrite, sodium_munlock, sodium_pad, sodium_stackzero, sodium_unpad
-
Constructor Details
-
SodiumJava
public SodiumJava()Creates the SodiumJava instance. Uses the default loading mode, first attempting to load the system sodium, and, if that fails — the bundled one. -
SodiumJava
Creates the SodiumJava using the given loading mode.- Parameters:
loadingMode- controls which sodium library (installed in the system or bundled in the JAR) is loaded, and in which order- See Also:
-
SodiumJava
-
-
Method Details
-
getClassesToRegister
-
crypto_pwhash_scryptsalsa208sha256
public int crypto_pwhash_scryptsalsa208sha256(byte[] out, long outLen, byte[] password, long passwordLen, byte[] salt, long opsLimit, long memLimit) -
crypto_pwhash_scryptsalsa208sha256_str
public int crypto_pwhash_scryptsalsa208sha256_str(byte[] out, byte[] password, long passwordLen, long opsLimit, long memLimit) -
crypto_pwhash_scryptsalsa208sha256_str_verify
public int crypto_pwhash_scryptsalsa208sha256_str_verify(byte[] str, byte[] password, long passwordLen) -
crypto_pwhash_scryptsalsa208sha256_ll
public int crypto_pwhash_scryptsalsa208sha256_ll(byte[] password, int passwordLen, byte[] salt, int saltLen, long N, long r, long p, byte[] buf, int bufLen) -
crypto_pwhash_scryptsalsa208sha256_str_needs_rehash
public int crypto_pwhash_scryptsalsa208sha256_str_needs_rehash(byte[] password, long opsLimit, long memLimit) -
crypto_stream_salsa2012_keygen
public void crypto_stream_salsa2012_keygen(byte[] key) -
crypto_stream_salsa2012
public int crypto_stream_salsa2012(byte[] c, long cLen, byte[] nonce, byte[] key) -
crypto_stream_salsa2012_xor
public int crypto_stream_salsa2012_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) -
crypto_stream_salsa208_keygen
public void crypto_stream_salsa208_keygen(byte[] key) -
crypto_stream_salsa208
public int crypto_stream_salsa208(byte[] c, long cLen, byte[] nonce, byte[] key) -
crypto_stream_salsa208_xor
public int crypto_stream_salsa208_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) -
crypto_stream_xchacha20
public int crypto_stream_xchacha20(byte[] c, long cLen, byte[] nonce, byte[] key) -
crypto_stream_xchacha20_xor
public int crypto_stream_xchacha20_xor(byte[] cipher, byte[] message, long messageLen, byte[] nonce, byte[] key) -
crypto_stream_xchacha20_xor_ic
public int crypto_stream_xchacha20_xor_ic(byte[] cipher, byte[] message, long messageLen, byte[] nonce, long ic, byte[] key) -
crypto_stream_xchacha20_keygen
public void crypto_stream_xchacha20_keygen(byte[] key)
-