public interface Hash
| Modifier and Type | Method and Description |
|---|---|
void |
check(java.lang.String pass,
java.lang.String hash,
java.lang.String domain) |
java.lang.String |
hash(java.lang.String pass,
java.lang.String domain)
Hashes a password with default algorithm or with a specific one if domain is provided or
system properties are set
|
java.lang.String hash(java.lang.String pass,
java.lang.String domain)
throws java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.io.UnsupportedEncodingException
pass - passworddomain - domain can be nulljava.security.spec.InvalidKeySpecExceptionjava.security.NoSuchAlgorithmExceptionjava.io.UnsupportedEncodingExceptionvoid check(java.lang.String pass,
java.lang.String hash,
java.lang.String domain)
throws IllegalAlgorithmException,
InvalidPasswordException,
java.security.NoSuchAlgorithmException,
java.security.spec.InvalidKeySpecException,
java.io.UnsupportedEncodingException
pass - passwordhash - domain - IllegalAlgorithmException - thrown when user password in db is found to be hashed with outdated or
unwanted algorithm due to configuration changes or found vulnerabilities. Rehash password and save the new one in db.InvalidPasswordException - if password after hashing doesn't match hash (invalid password provided).java.security.spec.InvalidKeySpecExceptionjava.security.NoSuchAlgorithmExceptionjava.io.UnsupportedEncodingExceptionCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.