public class LazySodiumJava extends LazySodium implements Scrypt.Native, Scrypt.Lazy, StreamJava.Native, StreamJava.Lazy
charset, messageEncoder| Constructor and Description |
|---|
LazySodiumJava(SodiumJava sodium) |
LazySodiumJava(SodiumJava sodium,
java.nio.charset.Charset charset) |
LazySodiumJava(SodiumJava sodium,
java.nio.charset.Charset charset,
MessageEncoder messageEncoder) |
LazySodiumJava(SodiumJava sodium,
MessageEncoder messageEncoder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cryptoPwHashScryptSalsa208Sha256(byte[] out,
long outLen,
byte[] password,
long passwordLen,
byte[] salt,
long opsLimit,
long memLimit) |
java.lang.String |
cryptoPwHashScryptSalsa208Sha256(java.lang.String password,
long hashLen,
byte[] salt,
long opsLimit,
long memLimit)
Hash a password using a salt.
|
boolean |
cryptoPwHashScryptSalsa208Sha256Ll(byte[] password,
int passwordLen,
byte[] salt,
int saltLen,
long N,
long r,
long p,
byte[] buf,
int bufLen) |
boolean |
cryptoPwHashScryptSalsa208Sha256Str(byte[] out,
byte[] password,
long passwordLen,
long opsLimit,
long memLimit) |
java.lang.String |
cryptoPwHashScryptSalsa208Sha256Str(java.lang.String password,
long opsLimit,
long memLimit)
The most minimal way of hashing a given password
using Scrypt.
|
boolean |
cryptoPwHashScryptSalsa208Sha256StrNeedsRehash(byte[] hash,
long opsLimit,
long memLimit)
Checks whether the Scrypt hash needs a rehash.
|
boolean |
cryptoPwHashScryptSalsa208Sha256StrVerify(byte[] str,
byte[] password,
long passwordLen) |
boolean |
cryptoPwHashScryptSalsa208Sha256StrVerify(java.lang.String hash,
java.lang.String password)
Verifies a string that was hashed
using Scrypt.
|
byte[] |
cryptoStream(byte[] nonce,
Key key,
StreamJava.Method method) |
Key |
cryptoStreamKeygen(StreamJava.Method method) |
boolean |
cryptoStreamSalsa2012(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
void |
cryptoStreamSalsa2012Keygen(byte[] key) |
boolean |
cryptoStreamSalsa2012Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
boolean |
cryptoStreamSalsa208(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
void |
cryptoStreamSalsa208Keygen(byte[] key) |
boolean |
cryptoStreamSalsa208Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
boolean |
cryptoStreamXChaCha20(byte[] c,
long cLen,
byte[] nonce,
byte[] key) |
boolean |
cryptoStreamXChaCha20Ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key) |
void |
cryptoStreamXChaCha20Keygen(byte[] key) |
boolean |
cryptoStreamXChaCha20Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key) |
java.lang.String |
cryptoStreamXor(java.lang.String message,
byte[] nonce,
Key key,
StreamJava.Method method) |
java.lang.String |
cryptoStreamXorDecrypt(java.lang.String cipher,
byte[] nonce,
Key key,
StreamJava.Method method) |
java.lang.String |
cryptoStreamXorIc(java.lang.String message,
byte[] nonce,
long ic,
Key key,
StreamJava.Method method) |
java.lang.String |
cryptoStreamXorIcDecrypt(java.lang.String cipher,
byte[] nonce,
long ic,
Key key,
StreamJava.Method method) |
SodiumJava |
getSodium() |
bytes, convertKeyPairEd25519ToCurve25519, convertPublicKeyEd25519ToCurve25519, convertSecretKeyEd25519ToCurve25519, cryptoAeadAES256GCMDecrypt, cryptoAeadAES256GCMDecryptDetached, cryptoAeadAES256GCMEncrypt, cryptoAeadAES256GCMEncryptDetached, cryptoAeadAES256GCMIsAvailable, cryptoAeadAES256GCMKeygen, cryptoAeadChaCha20Poly1305Decrypt, cryptoAeadChaCha20Poly1305DecryptDetached, cryptoAeadChaCha20Poly1305Encrypt, cryptoAeadChaCha20Poly1305EncryptDetached, cryptoAeadChaCha20Poly1305IetfDecrypt, cryptoAeadChaCha20Poly1305IetfDecryptDetached, cryptoAeadChaCha20Poly1305IetfEncrypt, cryptoAeadChaCha20Poly1305IetfEncryptDetached, cryptoAeadChaCha20Poly1305IetfKeygen, cryptoAeadChaCha20Poly1305Keygen, cryptoAeadXChaCha20Poly1305IetfDecrypt, cryptoAeadXChaCha20Poly1305IetfDecryptDetached, cryptoAeadXChaCha20Poly1305IetfEncrypt, cryptoAeadXChaCha20Poly1305IetfEncryptDetached, cryptoAeadXChaCha20Poly1305IetfKeygen, cryptoAuth, cryptoAuth, cryptoAuthHMACSha, cryptoAuthHMACSha256, cryptoAuthHMACSha256Final, cryptoAuthHMACSha256Init, cryptoAuthHMACSha256Keygen, cryptoAuthHMACSha256Update, cryptoAuthHMACSha256Verify, cryptoAuthHMACSha512, cryptoAuthHMACSha512256, cryptoAuthHMACSha512256Final, cryptoAuthHMACSha512256Init, cryptoAuthHMACSha512256Keygen, cryptoAuthHMACSha512256Update, cryptoAuthHMACSha512256Verify, cryptoAuthHMACSha512Final, cryptoAuthHMACSha512Init, cryptoAuthHMACSha512Keygen, cryptoAuthHMACSha512Update, cryptoAuthHMACSha512Verify, cryptoAuthHMACShaFinal, cryptoAuthHMACShaFinal, cryptoAuthHMACShaFinal, cryptoAuthHMACShaInit, cryptoAuthHMACShaInit, cryptoAuthHMACShaInit, cryptoAuthHMACShaKeygen, cryptoAuthHMACShaUpdate, cryptoAuthHMACShaUpdate, cryptoAuthHMACShaUpdate, cryptoAuthHMACShaVerify, cryptoAuthKeygen, cryptoAuthKeygen, cryptoAuthVerify, cryptoAuthVerify, cryptoBoxBeforeNm, cryptoBoxBeforeNm, cryptoBoxBeforeNm, cryptoBoxDetached, cryptoBoxDetachedAfterNm, cryptoBoxDetachedAfterNm, cryptoBoxEasy, cryptoBoxEasy, cryptoBoxEasyAfterNm, cryptoBoxEasyAfterNm, cryptoBoxKeypair, cryptoBoxKeypair, cryptoBoxOpenDetached, cryptoBoxOpenDetachedAfterNm, cryptoBoxOpenDetachedAfterNm, cryptoBoxOpenEasy, cryptoBoxOpenEasy, cryptoBoxOpenEasyAfterNm, cryptoBoxOpenEasyAfterNm, cryptoBoxSeal, cryptoBoxSealEasy, cryptoBoxSealOpen, cryptoBoxSealOpenEasy, cryptoBoxSeedKeypair, cryptoBoxSeedKeypair, cryptoGenericHash, cryptoGenericHash, cryptoGenericHash, cryptoGenericHash, cryptoGenericHashFinal, cryptoGenericHashFinal, cryptoGenericHashInit, cryptoGenericHashInit, cryptoGenericHashInit, cryptoGenericHashKeygen, cryptoGenericHashKeygen, cryptoGenericHashKeygen, cryptoGenericHashStateBytes, cryptoGenericHashUpdate, cryptoGenericHashUpdate, cryptoHashSha256, cryptoHashSha256, cryptoHashSha256Final, cryptoHashSha256Final, cryptoHashSha256Init, cryptoHashSha256Update, cryptoHashSha256Update, cryptoHashSha512, cryptoHashSha512, cryptoHashSha512Final, cryptoHashSha512Final, cryptoHashSha512Init, cryptoHashSha512Update, cryptoHashSha512Update, cryptoKdfDeriveFromKey, cryptoKdfDeriveFromKey, cryptoKdfKeygen, cryptoKdfKeygen, cryptoKxClientSessionKeys, cryptoKxClientSessionKeys, cryptoKxClientSessionKeys, cryptoKxKeypair, cryptoKxKeypair, cryptoKxKeypair, cryptoKxSeedKeypair, cryptoKxServerSessionKeys, cryptoKxServerSessionKeys, cryptoKxServerSessionKeys, cryptoPwHash, cryptoPwHash, cryptoPwHashStr, cryptoPwHashStr, cryptoPwHashStrNeedsRehash, cryptoPwHashStrRemoveNulls, cryptoPwHashStrVerify, cryptoPwHashStrVerify, cryptoScalarMult, cryptoScalarMult, cryptoScalarMultBase, cryptoScalarMultBase, cryptoSecretBoxDetached, cryptoSecretBoxDetached, cryptoSecretBoxEasy, cryptoSecretBoxEasy, cryptoSecretBoxKeygen, cryptoSecretBoxKeygen, cryptoSecretBoxOpenDetached, cryptoSecretBoxOpenDetached, cryptoSecretBoxOpenEasy, cryptoSecretBoxOpenEasy, cryptoSecretStreamInitPull, cryptoSecretStreamInitPull, cryptoSecretStreamInitPush, cryptoSecretStreamInitPush, cryptoSecretStreamKeygen, cryptoSecretStreamKeygen, cryptoSecretStreamPull, cryptoSecretStreamPull, cryptoSecretStreamPull, cryptoSecretStreamPush, cryptoSecretStreamPush, cryptoSecretStreamPush, cryptoSecretStreamPush, cryptoSecretStreamRekey, cryptoShortHash, cryptoShortHash, cryptoShortHashKeygen, cryptoShortHashKeygen, cryptoSign, cryptoSign, cryptoSign, cryptoSignDetached, cryptoSignDetached, cryptoSignEd25519SkToPk, cryptoSignEd25519SkToSeed, cryptoSignFinalCreate, cryptoSignFinalVerify, cryptoSignInit, cryptoSignKeypair, cryptoSignKeypair, cryptoSignOpen, cryptoSignOpen, cryptoSignSecretKeyPair, cryptoSignSeedKeypair, cryptoSignSeedKeypair, cryptoSignUpdate, cryptoSignVerifyDetached, cryptoSignVerifyDetached, cryptoStream, cryptoStreamChaCha20, cryptoStreamChaCha20Ietf, cryptoStreamChaCha20IetfKeygen, cryptoStreamChaCha20IetfXor, cryptoStreamChacha20IetfXorIc, cryptoStreamChaCha20Keygen, cryptoStreamChaCha20Xor, cryptoStreamChacha20XorIc, cryptoStreamDefaultXorIc, cryptoStreamKeygen, cryptoStreamSalsa20, cryptoStreamSalsa20Keygen, cryptoStreamSalsa20Xor, cryptoStreamSalsa20XorIc, cryptoStreamXor, cryptoStreamXorDecrypt, cryptoStreamXorIc, cryptoStreamXorIcDecrypt, cryptoStreamXSalsa20, cryptoStreamXSalsa20Keygen, cryptoStreamXSalsa20Xor, decrypt, decrypt, decryptDetached, encrypt, encrypt, encryptDetached, keygen, longToInt, main, nonce, randomBytesBuf, randomBytesDeterministic, randomBytesRandom, randomBytesUniform, removeNulls, res, sodiumAllocArray, sodiumBin2Hex, sodiumFree, sodiumHex2Bin, sodiumInit, sodiumMalloc, sodiumMemZero, sodiumMLock, sodiumMProtectNoAccess, sodiumMProtectReadOnly, sodiumMProtectReadWrite, sodiumMUnlock, sodiumPad, sodiumUnpad, str, str, successful, toBin, toBinary, toHex, toHexStr, wrongLen, wrongLen, wrongLenclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcryptoStreamChaCha20, cryptoStreamChaCha20Ietf, cryptoStreamChaCha20IetfKeygen, cryptoStreamChaCha20IetfXor, cryptoStreamChacha20IetfXorIc, cryptoStreamChaCha20Keygen, cryptoStreamChaCha20Xor, cryptoStreamChacha20XorIc, cryptoStreamSalsa20, cryptoStreamSalsa20Keygen, cryptoStreamSalsa20Xor, cryptoStreamSalsa20XorIc, cryptoStreamXSalsa20, cryptoStreamXSalsa20Keygen, cryptoStreamXSalsa20XorcryptoStream, cryptoStreamKeygen, cryptoStreamXor, cryptoStreamXorDecrypt, cryptoStreamXorIc, cryptoStreamXorIcDecryptpublic LazySodiumJava(SodiumJava sodium)
public LazySodiumJava(SodiumJava sodium, java.nio.charset.Charset charset)
public LazySodiumJava(SodiumJava sodium, MessageEncoder messageEncoder)
public LazySodiumJava(SodiumJava sodium, java.nio.charset.Charset charset, MessageEncoder messageEncoder)
public boolean cryptoPwHashScryptSalsa208Sha256(byte[] out,
long outLen,
byte[] password,
long passwordLen,
byte[] salt,
long opsLimit,
long memLimit)
cryptoPwHashScryptSalsa208Sha256 in interface Scrypt.Nativepublic boolean cryptoPwHashScryptSalsa208Sha256Str(byte[] out,
byte[] password,
long passwordLen,
long opsLimit,
long memLimit)
cryptoPwHashScryptSalsa208Sha256Str in interface Scrypt.Nativepublic boolean cryptoPwHashScryptSalsa208Sha256StrVerify(byte[] str,
byte[] password,
long passwordLen)
cryptoPwHashScryptSalsa208Sha256StrVerify in interface Scrypt.Nativepublic boolean cryptoPwHashScryptSalsa208Sha256Ll(byte[] password,
int passwordLen,
byte[] salt,
int saltLen,
long N,
long r,
long p,
byte[] buf,
int bufLen)
cryptoPwHashScryptSalsa208Sha256Ll in interface Scrypt.Nativepublic boolean cryptoPwHashScryptSalsa208Sha256StrNeedsRehash(byte[] hash,
long opsLimit,
long memLimit)
Scrypt.NativecryptoPwHashScryptSalsa208Sha256StrNeedsRehash in interface Scrypt.Nativehash - The Scrypt hash.opsLimit - The operations limit used.memLimit - The memory limit used.public java.lang.String cryptoPwHashScryptSalsa208Sha256(java.lang.String password,
long hashLen,
byte[] salt,
long opsLimit,
long memLimit)
throws SodiumException
Scrypt.LazycryptoPwHashScryptSalsa208Sha256 in interface Scrypt.Lazypassword - The password string to hash.hashLen - The length of the resulting hash. Between Scrypt.SCRYPTSALSA208SHA256_BYTES_MIN
and Scrypt.SCRYPTSALSA208SHA256_BYTES_MAX.salt - The salt to use.opsLimit - The number of cycles to perform whilst hashing.
Between Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MAX.memLimit - The amount of memory to use.
Between Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MAX.SodiumException - If the password could not be hashed.public java.lang.String cryptoPwHashScryptSalsa208Sha256Str(java.lang.String password,
long opsLimit,
long memLimit)
throws SodiumException
Scrypt.LazycryptoPwHashScryptSalsa208Sha256Str in interface Scrypt.Lazypassword - The password string to hash.opsLimit - The number of cycles to perform whilst hashing.
Between Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_OPSLIMIT_MAX.memLimit - The amount of memory to use.
Between Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MIN and Scrypt.SCRYPTSALSA208SHA256_MEMLIMIT_MAX.SodiumException - If the password could not be hashed.public boolean cryptoPwHashScryptSalsa208Sha256StrVerify(java.lang.String hash,
java.lang.String password)
Scrypt.LazycryptoPwHashScryptSalsa208Sha256StrVerify in interface Scrypt.Lazyhash - The hash with or without a null terminating byte.password - The passwordpublic void cryptoStreamSalsa2012Keygen(byte[] key)
cryptoStreamSalsa2012Keygen in interface StreamJava.Nativepublic boolean cryptoStreamSalsa2012(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
cryptoStreamSalsa2012 in interface StreamJava.Nativepublic boolean cryptoStreamSalsa2012Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
cryptoStreamSalsa2012Xor in interface StreamJava.Nativepublic void cryptoStreamSalsa208Keygen(byte[] key)
cryptoStreamSalsa208Keygen in interface StreamJava.Nativepublic boolean cryptoStreamSalsa208(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
cryptoStreamSalsa208 in interface StreamJava.Nativepublic boolean cryptoStreamSalsa208Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
cryptoStreamSalsa208Xor in interface StreamJava.Nativepublic void cryptoStreamXChaCha20Keygen(byte[] key)
cryptoStreamXChaCha20Keygen in interface StreamJava.Nativepublic boolean cryptoStreamXChaCha20(byte[] c,
long cLen,
byte[] nonce,
byte[] key)
cryptoStreamXChaCha20 in interface StreamJava.Nativepublic boolean cryptoStreamXChaCha20Xor(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
byte[] key)
cryptoStreamXChaCha20Xor in interface StreamJava.Nativepublic boolean cryptoStreamXChaCha20Ic(byte[] cipher,
byte[] message,
long messageLen,
byte[] nonce,
long ic,
byte[] key)
cryptoStreamXChaCha20Ic in interface StreamJava.Nativepublic Key cryptoStreamKeygen(StreamJava.Method method)
cryptoStreamKeygen in interface StreamJava.Lazypublic byte[] cryptoStream(byte[] nonce,
Key key,
StreamJava.Method method)
cryptoStream in interface StreamJava.Lazypublic java.lang.String cryptoStreamXor(java.lang.String message,
byte[] nonce,
Key key,
StreamJava.Method method)
cryptoStreamXor in interface StreamJava.Lazypublic java.lang.String cryptoStreamXorDecrypt(java.lang.String cipher,
byte[] nonce,
Key key,
StreamJava.Method method)
cryptoStreamXorDecrypt in interface StreamJava.Lazypublic java.lang.String cryptoStreamXorIc(java.lang.String message,
byte[] nonce,
long ic,
Key key,
StreamJava.Method method)
cryptoStreamXorIc in interface StreamJava.Lazypublic java.lang.String cryptoStreamXorIcDecrypt(java.lang.String cipher,
byte[] nonce,
long ic,
Key key,
StreamJava.Method method)
cryptoStreamXorIcDecrypt in interface StreamJava.Lazypublic SodiumJava getSodium()
getSodium in class LazySodium