public abstract class DigestAlgorithmBuilder extends Object implements HashingAlgorithmBuilder
DigestAlgorithm| Modifier | Constructor and Description |
|---|---|
protected |
DigestAlgorithmBuilder() |
| Modifier and Type | Method and Description |
|---|---|
HashingAlgorithm |
build()
Builds a new instance of hashing algorithm.
|
DigestAlgorithmBuilder |
bytesRepresentation(BytesRepresentation bytesRepresentation)
Sets how byte arrays will be represented in strings.
|
DigestAlgorithmBuilder |
encoding(String encoding)
Sets encoding for strings in input and output.
|
protected abstract String |
getAlgorithm()
Gets a name of algorithm supported by digest.
|
RepeatingDecoratorBuilder |
repeated(int repeats)
Builds a hashing algorithm and wraps it into repeating decorator builder.
|
SaltingAdapterBuilder |
salted()
Builds a hashing algorithm and wraps it by salting adapter builder.
|
SaltingAdapterBuilder |
salted(CombineAlgorithm combineAlgorithm)
Builds a hashing algorithm and wraps it by salting adapter builder with custom combine algorithm.
|
protected abstract String getAlgorithm()
public DigestAlgorithmBuilder bytesRepresentation(BytesRepresentation bytesRepresentation)
HexRepresentation is used.bytesRepresentation - byte array representation strategypublic DigestAlgorithmBuilder encoding(String encoding)
encoding - encoding to be setpublic SaltingAdapterBuilder salted()
public SaltingAdapterBuilder salted(CombineAlgorithm combineAlgorithm)
combineAlgorithm - combine algorithm for input text and saltpublic RepeatingDecoratorBuilder repeated(int repeats)
repeats - count of repeatspublic HashingAlgorithm build() throws EncryptionException
HashingAlgorithmBuilderbuild in interface HashingAlgorithmBuilderEncryptionExceptionCopyright © 2014. All rights reserved.