Package de.mkammerer.argon2
Interface Argon2Advanced
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Stringhash(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt)Hashes a password, using the given salt.byte[]pbkdf(int iterations, int memory, int parallelism, byte[] password, byte[] salt, int keyLength)Uses the given password to generate key material (password based key derivation).byte[]pbkdf(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt, int keyLength)Uses the given password to generate key material (password based key derivation).byte[]rawHash(int iterations, int memory, int parallelism, byte[] data, byte[] salt)Hashes the given data and returns the raw bytes.byte[]rawHash(int iterations, int memory, int parallelism, char[] password, byte[] salt)Hashes a password and returns the raw bytes.byte[]rawHash(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt)Hashes a password and returns the raw bytes.byte[]rawHash(int iterations, int memory, int parallelism, java.lang.String password, byte[] salt)Deprecated.Use therawHash(int, int, int, char[], byte[])method instead.byte[]rawHash(int iterations, int memory, int parallelism, java.lang.String password, java.nio.charset.Charset charset, byte[] salt)Deprecated.Use theArgon2.hash(int, int, int, char[], Charset)method instead.
-
-
-
Method Detail
-
rawHash
@Deprecated byte[] rawHash(int iterations, int memory, int parallelism, java.lang.String password, byte[] salt)Deprecated.Use therawHash(int, int, int, char[], byte[])method instead. Will be removed in version 3.Hashes a password and returns the raw bytes.Uses UTF-8 encoding.
- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to hashsalt- Salt to use. This will override the default salt length- Returns:
- Hashed password in raw bytes.
-
rawHash
@Deprecated byte[] rawHash(int iterations, int memory, int parallelism, java.lang.String password, java.nio.charset.Charset charset, byte[] salt)Deprecated.Use theArgon2.hash(int, int, int, char[], Charset)method instead. Will be removed in version 3.Hashes a password and returns the raw bytes.- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to hashcharset- Charset of the passwordsalt- Salt to use. This will override the default salt length- Returns:
- Hashed password in raw bytes.
-
rawHash
byte[] rawHash(int iterations, int memory, int parallelism, char[] password, byte[] salt)Hashes a password and returns the raw bytes.Uses UTF-8 encoding.
- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to hashsalt- Salt to use. This will override the default salt length- Returns:
- Hashed password in raw bytes.
-
rawHash
byte[] rawHash(int iterations, int memory, int parallelism, byte[] data, byte[] salt)Hashes the given data and returns the raw bytes.- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanesdata- Data to hashsalt- Salt to use. This will override the default salt length- Returns:
- Hashed data in raw bytes.
-
rawHash
byte[] rawHash(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt)Hashes a password and returns the raw bytes.- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to hashcharset- Charset of the passwordsalt- Salt to use. This will override the default salt length- Returns:
- Hashed password in raw bytes.
-
pbkdf
byte[] pbkdf(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt, int keyLength)Uses the given password to generate key material (password based key derivation).- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to generate key material fromcharset- Charset of the passwordsalt- Salt to use. This will override the default salt lengthkeyLength- Length of the returned key material in bytes.- Returns:
- Key material.
-
pbkdf
byte[] pbkdf(int iterations, int memory, int parallelism, byte[] password, byte[] salt, int keyLength)Uses the given password to generate key material (password based key derivation).- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to generate key material fromsalt- Salt to use. This will override the default salt lengthkeyLength- Length of the returned key material in bytes.- Returns:
- Key material.
-
hash
java.lang.String hash(int iterations, int memory, int parallelism, char[] password, java.nio.charset.Charset charset, byte[] salt)Hashes a password, using the given salt.- Parameters:
iterations- Number of iterationsmemory- Sets memory usage to x kibibytesparallelism- Number of threads and compute lanespassword- Password to hashcharset- Charset of the passwordsalt- Salt- Returns:
- Hashed password.
-
-