public class SHA1Builder extends DigestAlgorithmBuilder
Builder for SHA-1 hashing algorithm.
Even when this algorithm is stronger than MD5Builder, it has also its weaknesses.
If you can choose, go with some stronger function (e.g. SHA-256 or SHA-512).
You can make potential attacks harder if you use salt (e.g. by using SaltingAdapter).
You can also do repeated hashing by using RepeatingDecorator if higher execution time is not an issue for you.
This class is immutable and can be considered thread safe.
| Constructor and Description |
|---|
SHA1Builder()
Creates a new builder for MD5 hashing algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getAlgorithm()
Gets a name of algorithm supported by digest.
|
build, bytesRepresentation, encoding, repeated, salted, saltedpublic SHA1Builder()
protected String getAlgorithm()
DigestAlgorithmBuildergetAlgorithm in class DigestAlgorithmBuilderCopyright © 2014. All rights reserved.