Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- accept(ConsumerE<? super byte[], Ex>) - Method in class com.aoapps.security.UnprotectedKey
-
Calls a consumer, providing a copy of the key.
- accept(ConsumerE<? super char[], Ex>) - Method in class com.aoapps.security.UnprotectedPassword
-
Calls a consumer, providing a copy of the password.
- ALGORITHM - Static variable in class com.aoapps.security.HashedKey
-
Deprecated.
C
- clone() - Method in class com.aoapps.security.Key
- clone() - Method in class com.aoapps.security.Password
- clone() - Method in class com.aoapps.security.UnprotectedKey
- clone() - Method in class com.aoapps.security.UnprotectedPassword
- close() - Method in class com.aoapps.security.Key
-
Destroys the key on auto-close.
- close() - Method in class com.aoapps.security.Password
-
Destroys the password on auto-close.
- com.aoapps.security - module com.aoapps.security
- com.aoapps.security - package com.aoapps.security
- compareTo(HashedKey) - Method in class com.aoapps.security.HashedKey
- compareTo(Identifier) - Method in class com.aoapps.security.Identifier
-
Unsigned ordering.
- compareTo(SmallIdentifier) - Method in class com.aoapps.security.SmallIdentifier
-
Unsigned ordering.
- crypt(String) - Static method in class com.aoapps.security.UnixCrypt
-
Deprecated.This is not secure anymore. Please use
UnixCrypt.crypt(java.lang.String)
- crypt(String, String) - Static method in class com.aoapps.security.UnixCrypt
-
Deprecated.This is not secure anymore. Please use
UnixCrypt.crypt(java.lang.String, java.lang.String)
- CRYPT - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.
UnixCrypt
should not be used for any cryptographic purpose, plus this is barely salted and not iterated so is subject to both dictionary and brute-force attacks.
D
- destroy() - Method in class com.aoapps.security.Key
- destroy() - Method in class com.aoapps.security.Password
E
- equals(Identifier) - Method in class com.aoapps.security.Identifier
-
Performs comparisons in length-constant time.
- equals(SmallIdentifier) - Method in class com.aoapps.security.SmallIdentifier
- equals(Object) - Method in class com.aoapps.security.HashedKey
-
Checks if equal to another hashed key, always
false
when either isHashedKey.NO_KEY
. - equals(Object) - Method in class com.aoapps.security.HashedPassword
-
Checks if equal to another hashed password, always
false
when either isHashedPassword.NO_PASSWORD
. - equals(Object) - Method in class com.aoapps.security.Identifier
- equals(Object) - Method in class com.aoapps.security.Key
- equals(Object) - Method in class com.aoapps.security.Password
- equals(Object) - Method in class com.aoapps.security.SmallIdentifier
F
- findAlgorithm(String) - Static method in enum com.aoapps.security.HashedKey.Algorithm
-
Case-insensitive lookup by algorithm name.
- findAlgorithm(String) - Static method in enum com.aoapps.security.HashedPassword.Algorithm
-
Case-insensitive lookup by algorithm name.
G
- generateKey() - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Generates a random plaintext key of
HashedKey.Algorithm.getKeyBytes()
bytes in length using a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. - generateKey() - Static method in class com.aoapps.security.HashedKey
-
Deprecated.This generates a key for the previous default algorithm, using the previous default of 256-bit length, please use
HashedKey.Algorithm.generateKey()
instead. - generateKey(SecureRandom) - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Generates a random plaintext key of
HashedKey.Algorithm.getKeyBytes()
bytes in length using the providedSecureRandom
source. - generateKey(Random) - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - generateSalt() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Generates a random salt of
HashedPassword.Algorithm.getSaltBytes()
bytes in length using a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. - generateSalt() - Static method in class com.aoapps.security.HashedPassword
-
Deprecated.This generates a salt for the previous default algorithm, please use
HashedPassword.Algorithm.generateSalt()
,HashedPassword(com.aoapps.security.Password)
,HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm)
,HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int)
instead. - generateSalt(SecureRandom) - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Generates a random salt of
HashedPassword.Algorithm.getSaltBytes()
bytes in length using the providedSecureRandom
source. - generateSalt(Random) - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - getAlgorithm() - Method in class com.aoapps.security.HashedKey
- getAlgorithm() - Method in class com.aoapps.security.HashedPassword
- getAlgorithmName() - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Gets the
MessageDigest
algorithm name. - getAlgorithmName() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the
SecretKeyFactory
algorithm name. - getHash() - Method in class com.aoapps.security.HashedKey
- getHash() - Method in class com.aoapps.security.HashedPassword
- getHashBytes() - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Gets the number of bytes required to store the generated hash.
- getHashBytes() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the number of bytes required to store the generated hash.
- getHi() - Method in class com.aoapps.security.Identifier
- getIterations() - Method in class com.aoapps.security.HashedPassword
- getKeyBytes() - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Gets the number of bytes of cryptographically strong random data that must be used with this algorithm.
- getLo() - Method in class com.aoapps.security.Identifier
- getMaximumIterations() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the maximum number of iterations allowed or
0
when algorithm is not iterated. - getMinimumIterations() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the minimum number of iterations allowed or
0
when algorithm is not iterated. - getRecommendedIterations() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the recommended number of iterations for typical usage or
0
when algorithm is not iterated. - getSalt() - Method in class com.aoapps.security.HashedPassword
- getSaltBytes() - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Gets the number of bytes of cryptographically strong random data that must be used with this algorithm.
- getValue() - Method in class com.aoapps.security.SmallIdentifier
H
- hash(byte[]) - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.Please use
HashedKey.Algorithm.hash(com.aoapps.security.Key)
instead. - hash(byte[]) - Static method in class com.aoapps.security.HashedKey
-
Deprecated.This generates a hash for the previous default algorithm and does not zero the key, please use
HashedKey.Algorithm.hash(byte[])
instead. - hash(Key) - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Hashes the given key.
- hash(Password, byte[], int) - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Hash the given password to
HashedPassword.Algorithm.getHashBytes()
bytes. - hash(String, byte[], int) - Method in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.Please use
HashedPassword.Algorithm.hash(com.aoapps.security.Password, byte[], int)
so the password may be destroyed. - hash(String, byte[], int) - Static method in class com.aoapps.security.HashedPassword
-
Deprecated.This generates a hash for the previous default algorithm and does not allow the password to be destroyed, please use
HashedPassword.Algorithm.hash(com.aoapps.security.Password, byte[], int)
,HashedPassword(com.aoapps.security.Password)
,HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm)
,HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int)
instead. - HASH_BYTES - Static variable in class com.aoapps.security.HashedKey
-
Deprecated.This is the value matching the previous default algorithm, please use
HashedKey.Algorithm.getHashBytes()
instead. - HASH_BYTES - Static variable in class com.aoapps.security.HashedPassword
-
Deprecated.This is the value matching the previous default algorithm, please use
HashedPassword.Algorithm.getHashBytes()
instead. - hashCode() - Method in class com.aoapps.security.HashedKey
-
The hash code is taken from the last 32 bits of the hash.
- hashCode() - Method in class com.aoapps.security.HashedPassword
-
The hash code is taken from the last 32 bits of the hash.
- hashCode() - Method in class com.aoapps.security.Identifier
- hashCode() - Method in class com.aoapps.security.Key
-
Uses default implementation from
Object.hashCode()
. - hashCode() - Method in class com.aoapps.security.Password
-
Uses default implementation from
Object.hashCode()
. - hashCode() - Method in class com.aoapps.security.SmallIdentifier
- hashCode() - Method in class com.aoapps.security.UnprotectedKey
-
Implements hash code via
Arrays.hashCode(byte[])
on the key. - hashCode() - Method in class com.aoapps.security.UnprotectedPassword
-
Implements hash code via
Arrays.hashCode(char[])
on the password. - HashedKey - Class in com.aoapps.security
-
A hashed random key.
- HashedKey(byte[]) - Constructor for class com.aoapps.security.HashedKey
-
Deprecated.This represents a hash using the previous default algorithm, please use
HashedKey(com.aoapps.security.HashedKey.Algorithm, byte[])
instead. - HashedKey(HashedKey.Algorithm, byte[]) - Constructor for class com.aoapps.security.HashedKey
-
Deprecated.Please use
HashedKey.valueOf(com.aoapps.security.HashedKey.Algorithm, byte[])
, which is able to automatically return theHashedKey.NO_KEY
singleton. - HashedKey.Algorithm - Enum in com.aoapps.security
- HashedPassword - Class in com.aoapps.security
-
A salted, hashed and key stretched password.
- HashedPassword(byte[], int, byte[]) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.This represents a hash using the previous default algorithm, please use
HashedPassword(com.aoapps.security.Password)
,HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm)
, orHashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int)
instead. - HashedPassword(HashedPassword.Algorithm, byte[], int, byte[]) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword.valueOf(com.aoapps.security.HashedPassword.Algorithm, byte[], int, byte[])
, which is able to automatically return theHashedPassword.NO_PASSWORD
singleton. - HashedPassword(Password) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the recommended algorithm, a random salt, and the recommended iterations using a default
SecureRandom
instance, which is not a strong instance to avoid blocking. - HashedPassword(Password, HashedPassword.Algorithm) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, a random salt, and the recommended iterations using a default
SecureRandom
instance, which is not a strong instance to avoid blocking. - HashedPassword(Password, HashedPassword.Algorithm, byte[], int) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, salt, and iterations.
- HashedPassword(Password, HashedPassword.Algorithm, int) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, a random salt, and the given iterations using a default
SecureRandom
instance, which is not a strong instance to avoid blocking. - HashedPassword(Password, HashedPassword.Algorithm, int, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, a random salt, and the given iterations using the provided
SecureRandom
source. - HashedPassword(Password, HashedPassword.Algorithm, int, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - HashedPassword(Password, HashedPassword.Algorithm, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, a random salt, and the recommended iterations using the provided
SecureRandom
source. - HashedPassword(Password, HashedPassword.Algorithm, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - HashedPassword(Password, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the recommended algorithm, a random salt, and the recommended iterations using the provided
SecureRandom
source. - HashedPassword(Password, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - HashedPassword(String) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm, byte[], int) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, byte[], int)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm, int) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm, int, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int, java.security.SecureRandom)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm, int, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, int, java.util.Random)
so the password may be destroyed.Please use
SecureRandom
. This method should only be used after careful consideration. - HashedPassword(String, HashedPassword.Algorithm, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, java.security.SecureRandom)
so the password may be destroyed. - HashedPassword(String, HashedPassword.Algorithm, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, com.aoapps.security.HashedPassword.Algorithm, java.util.Random)
so the password may be destroyed.Please use
SecureRandom
. This method should only be used after careful consideration. - HashedPassword(String, SecureRandom) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, java.security.SecureRandom)
so the password may be destroyed. - HashedPassword(String, Random) - Constructor for class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword(com.aoapps.security.Password, java.util.Random)
so the password may be destroyed.Please use
SecureRandom
. This method should only be used after careful consideration. - HashedPassword(PBEKey) - Constructor for class com.aoapps.security.HashedPassword
-
Creates a new hashed password using the given algorithm, salt, and iterations.
- HashedPassword.Algorithm - Enum in com.aoapps.security
I
- Identifier - Class in com.aoapps.security
-
A 128-bit random identifier internally stored as two long values.
- Identifier() - Constructor for class com.aoapps.security.Identifier
-
Creates a new, random
Identifier
using a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. - Identifier(long, long) - Constructor for class com.aoapps.security.Identifier
- Identifier(String) - Constructor for class com.aoapps.security.Identifier
- Identifier(SecureRandom) - Constructor for class com.aoapps.security.Identifier
-
Creates a new, random
Identifier
using the providedSecureRandom
source. - Identifier(Random) - Constructor for class com.aoapps.security.Identifier
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - invoke(FunctionE<? super byte[], R, Ex>) - Method in class com.aoapps.security.UnprotectedKey
-
Calls a function, providing a copy of the key.
- invoke(FunctionE<? super char[], R, Ex>) - Method in class com.aoapps.security.UnprotectedPassword
-
Calls a function, providing a copy of the password.
- isDestroyed() - Method in class com.aoapps.security.Key
- isDestroyed() - Method in class com.aoapps.security.Password
- isRehashRecommended() - Method in class com.aoapps.security.HashedPassword
-
It is recommended to rehash the password during login when the recommended settings are stronger than the settings used in the previous hashing.
K
- Key - Class in com.aoapps.security
-
Represents plaintext random keys, with support for wiping the contents.
- Key(byte[]) - Constructor for class com.aoapps.security.Key
M
- main(String...) - Static method in class com.aoapps.security.HashedKey
- main(String...) - Static method in class com.aoapps.security.HashedPassword
- main(String[]) - Static method in class com.aoapps.security.Identifier
- main(String[]) - Static method in class com.aoapps.security.SmallIdentifier
- main(String[]) - Static method in class com.aoapps.security.UnixCrypt
-
Deprecated.This is not secure anymore. Please use
UnixCrypt
- MASKED_PASSWORD - Static variable in class com.aoapps.security.Password
-
A constant used to mask passwords.
- matches(Key) - Method in class com.aoapps.security.HashedKey
-
Checks if this matches the provided key, always
false
when isHashedKey.NO_KEY
. - matches(Password) - Method in class com.aoapps.security.HashedPassword
-
Checks if this matches the provided password, always
false
when isHashedPassword.NO_PASSWORD
. - matches(String) - Method in class com.aoapps.security.HashedPassword
-
Deprecated.Please use
HashedPassword.matches(com.aoapps.security.Password)
so the password may be destroyed. - MD5 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.MD5 should not be used for any cryptographic purpose.
- MD5 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.MD5 should not be used for any cryptographic purpose, plus this is neither salted nor iterated so is subject to both dictionary and brute-force attacks.
N
- NO_KEY - Static variable in class com.aoapps.security.HashedKey
-
A singleton that must be used in places where no key is set.
- NO_KEY_VALUE - Static variable in class com.aoapps.security.HashedKey
-
Indicates that no key is set.
- NO_PASSWORD - Static variable in class com.aoapps.security.HashedPassword
-
A singleton that must be used in places where no password is set.
- NO_PASSWORD_VALUE - Static variable in class com.aoapps.security.HashedPassword
-
Indicates that no password is set.
- NotAuthenticatedException - Exception Class in com.aoapps.security
-
Thrown when code that requires authentication is invoked in a context that doesn't have an authenticated user.
- NotAuthenticatedException() - Constructor for exception class com.aoapps.security.NotAuthenticatedException
- NotAuthenticatedException(String) - Constructor for exception class com.aoapps.security.NotAuthenticatedException
- NotAuthenticatedException(String, Throwable) - Constructor for exception class com.aoapps.security.NotAuthenticatedException
- NotAuthenticatedException(Throwable) - Constructor for exception class com.aoapps.security.NotAuthenticatedException
P
- Password - Class in com.aoapps.security
-
Represents plaintext password characters, with support for wiping the contents.
- Password(char[]) - Constructor for class com.aoapps.security.Password
- PBKDF2WITHHMACSHA1 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.This was the previous algorithm used. Please use
HashedPassword.Algorithm.PBKDF2WITHHMACSHA512
, which is the currentHashedPassword.RECOMMENDED_ALGORITHM
, for new passwords. - PBKDF2WITHHMACSHA224 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.Collision resistance of at least 128 bits is required
- PBKDF2WITHHMACSHA256 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
- PBKDF2WITHHMACSHA384 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
- PBKDF2WITHHMACSHA512 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
R
- readHashedKey(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a
HashedKey
. - readHashedPassword(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a
HashedPassword
. - readIdentifier(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads an
Identifier
. - readNullHashedKey(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a possibly-
null
HashedKey
. - readNullHashedPassword(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a possibly-
null
HashedPassword
. - readNullIdentifier(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a possibly-
null
Identifier
. - readNullSmallIdentifier(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a possibly-
null
Identifier
. - readSmallIdentifier(DataInputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Reads a
SmallIdentifier
. - RECOMMENDED_ALGORITHM - Static variable in class com.aoapps.security.HashedKey
-
The algorithm recommended for use with new keys.
- RECOMMENDED_ALGORITHM - Static variable in class com.aoapps.security.HashedPassword
-
The algorithm recommended for use with new passwords.
- RECOMMENDED_ITERATIONS - Static variable in class com.aoapps.security.HashedPassword
-
Deprecated.This is the value matching the previous default algorithm, please use
HashedPassword.Algorithm.getRecommendedIterations()
instead.
S
- SALT_BYTES - Static variable in class com.aoapps.security.HashedPassword
-
Deprecated.This is the value matching the previous default algorithm, please use
HashedPassword.Algorithm.getSaltBytes()
instead. - SecurityStreamables - Class in com.aoapps.security
-
Functions for streaming Security-related objects.
- SecurityUtil - Class in com.aoapps.security
- SHA_1 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.SHA-1 should no longer be used for any cryptographic purpose.
- SHA_1 - Enum constant in enum com.aoapps.security.HashedPassword.Algorithm
-
Deprecated.SHA-1 should no longer be used for any cryptographic purpose, plus this is neither salted nor iterated so is subject to both dictionary and brute-force attacks.
- SHA_224 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.Collision resistance of at least 128 bits is required
- SHA_256 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA_384 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA_512 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA_512_224 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.Collision resistance of at least 128 bits is required
- SHA_512_256 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA3_224 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.Collision resistance of at least 128 bits is required
- SHA3_256 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA3_384 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- SHA3_512 - Enum constant in enum com.aoapps.security.HashedKey.Algorithm
- slowAllZero(byte[]) - Static method in class com.aoapps.security.SecurityUtil
-
Compares if a byte array is all-zero in length-constant time.
- slowAllZero(char[]) - Static method in class com.aoapps.security.SecurityUtil
-
Compares if a char array is all-zero in length-constant time.
- slowEquals(byte[], byte[]) - Static method in class com.aoapps.security.SecurityUtil
-
Compares two byte arrays in length-constant time.
- slowEquals(char[], char[]) - Static method in class com.aoapps.security.SecurityUtil
-
Compares two char arrays in length-constant time.
- SmallIdentifier - Class in com.aoapps.security
-
A 64-bit random identifier internally stored as a long value.
- SmallIdentifier() - Constructor for class com.aoapps.security.SmallIdentifier
-
Creates a new, random
SmallIdentifier
using a defaultSecureRandom
instance, which is not a strong instance to avoid blocking. - SmallIdentifier(long) - Constructor for class com.aoapps.security.SmallIdentifier
- SmallIdentifier(String) - Constructor for class com.aoapps.security.SmallIdentifier
- SmallIdentifier(SecureRandom) - Constructor for class com.aoapps.security.SmallIdentifier
-
Creates a new, random
SmallIdentifier
using the providedSecureRandom
source. - SmallIdentifier(Random) - Constructor for class com.aoapps.security.SmallIdentifier
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration.
T
- test(PredicateE<? super byte[], Ex>) - Method in class com.aoapps.security.UnprotectedKey
-
Calls a predicate, providing a copy of the key.
- test(PredicateE<? super char[], Ex>) - Method in class com.aoapps.security.UnprotectedPassword
-
Calls a predicate, providing a copy of the password.
- toCharArray() - Method in class com.aoapps.security.Identifier
-
The external representation is a string of characters encoded in base #BASE, with the first #NUM_CHARACTERS characters for "hi" and the last #NUM_CHARACTERS characters for "lo".
- toCharArray() - Method in class com.aoapps.security.SmallIdentifier
-
The external representation is a string of characters encoded in base #BASE, with Identifier#NUM_CHARACTERS characters for "value".
- toString() - Method in enum com.aoapps.security.HashedKey.Algorithm
- toString() - Method in class com.aoapps.security.HashedKey
-
Gets the string representation of the hashed key The format is subject to change over time, but will maintain backward compatibility.
- toString() - Method in enum com.aoapps.security.HashedPassword.Algorithm
- toString() - Method in class com.aoapps.security.HashedPassword
-
Gets the string representation of the hashed password.
- toString() - Method in class com.aoapps.security.Identifier
-
The external representation is a string of characters encoded in base #BASE, with the first #NUM_CHARACTERS characters for "hi" and the last #NUM_CHARACTERS characters for "lo".
- toString() - Method in class com.aoapps.security.Key
- toString() - Method in class com.aoapps.security.Password
- toString() - Method in class com.aoapps.security.SmallIdentifier
-
The external representation is a string of characters encoded in base #BASE, with Identifier#NUM_CHARACTERS characters for "value".
U
- UnixCrypt - Class in com.aoapps.security
-
Deprecated.This is not secure anymore. We will be removing in a future major version update. If you still require this type of encryption, please use
UnixCrypt
. - UnprotectedKey - Class in com.aoapps.security
-
Unlike
Key
, which goes out of its way to protect the key, an unprotected key provides access to the key value. - UnprotectedKey(byte[]) - Constructor for class com.aoapps.security.UnprotectedKey
- UnprotectedKey(int) - Constructor for class com.aoapps.security.UnprotectedKey
-
Generates a new key of the given number of bytes.
- UnprotectedKey(int, SecureRandom) - Constructor for class com.aoapps.security.UnprotectedKey
-
Generates a new key of the given number of bytes using the provided
SecureRandom
source. - UnprotectedKey(int, Random) - Constructor for class com.aoapps.security.UnprotectedKey
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration. - UnprotectedKey(SupplierE<? extends byte[], Ex>) - Constructor for class com.aoapps.security.UnprotectedKey
-
Generates a new key using the provided key generator.
- UnprotectedPassword - Class in com.aoapps.security
-
Unlike
Password
, which goes out of its way to protect the password, an unprotected password provides access to the password value. - UnprotectedPassword() - Constructor for class com.aoapps.security.UnprotectedPassword
-
Generates a new password using the default password generator and a default
SecureRandom
instance, which is not a strong instance to avoid blocking. - UnprotectedPassword(char[]) - Constructor for class com.aoapps.security.UnprotectedPassword
- UnprotectedPassword(SupplierE<? extends char[], Ex>) - Constructor for class com.aoapps.security.UnprotectedPassword
-
Generates a new password using the provided password generator.
- UnprotectedPassword(SecureRandom) - Constructor for class com.aoapps.security.UnprotectedPassword
-
Generates a new password using the default password generator and the provided
SecureRandom
source. - UnprotectedPassword(Random) - Constructor for class com.aoapps.security.UnprotectedPassword
-
Deprecated.Please use
SecureRandom
. This method will stay, but will remain deprecated since it should only be used after careful consideration.
V
- validate(Function<? super String, Ex>, byte[], int, byte[]) - Method in enum com.aoapps.security.HashedPassword.Algorithm
- validateHash(Function<? super String, Ex>, byte[]) - Method in enum com.aoapps.security.HashedKey.Algorithm
- validateHash(Function<? super String, Ex>, byte[]) - Method in enum com.aoapps.security.HashedPassword.Algorithm
- validateIterations(Function<? super String, Ex>, int) - Method in enum com.aoapps.security.HashedPassword.Algorithm
- validateKey(Function<? super String, Ex>, byte[]) - Method in enum com.aoapps.security.HashedKey.Algorithm
-
Deprecated.
- validateKey(Function<? super String, Ex>, Key) - Method in enum com.aoapps.security.HashedKey.Algorithm
- validateSalt(Function<? super String, Ex>, byte[]) - Method in enum com.aoapps.security.HashedPassword.Algorithm
- valueOf(byte[]) - Static method in class com.aoapps.security.Key
-
Gets a new key or
Optional.empty()
whenkey == null || key.length == 0
. - valueOf(char[]) - Static method in class com.aoapps.security.Password
-
Gets a new password or
Optional.empty()
whenpassword == null || password.length == 0
. - valueOf(HashedKey.Algorithm, byte[]) - Static method in class com.aoapps.security.HashedKey
-
Restores a
HashedKey
from its individual fields. - valueOf(HashedPassword.Algorithm, byte[], int, byte[]) - Static method in class com.aoapps.security.HashedPassword
-
Restores a
HashedPassword
from its individual fields. - valueOf(String) - Static method in enum com.aoapps.security.HashedKey.Algorithm
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in class com.aoapps.security.HashedKey
-
Parses the result of
HashedKey.toString()
. - valueOf(String) - Static method in enum com.aoapps.security.HashedPassword.Algorithm
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in class com.aoapps.security.HashedPassword
-
Parses the result of
HashedPassword.toString()
. - valueOf(String) - Static method in class com.aoapps.security.Identifier
- valueOf(String) - Static method in class com.aoapps.security.SmallIdentifier
- values() - Static method in enum com.aoapps.security.HashedKey.Algorithm
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum com.aoapps.security.HashedPassword.Algorithm
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- writeHashedKey(HashedKey, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a
HashedKey
. - writeHashedPassword(HashedPassword, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a
HashedPassword
. - writeIdentifier(Identifier, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes an
Identifier
. - writeNullHashedKey(HashedKey, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a possibly-
null
HashedKey
. - writeNullHashedPassword(HashedPassword, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a possibly-
null
HashedPassword
. - writeNullIdentifier(Identifier, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a possibly-
null
Identifier
. - writeNullSmallIdentifier(SmallIdentifier, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a possibly-
null
SmallIdentifier
. - writeSmallIdentifier(SmallIdentifier, DataOutputStream) - Static method in class com.aoapps.security.SecurityStreamables
-
Writes a
SmallIdentifier
.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
HashedKey.Algorithm.getAlgorithmName()
instead.