public class TRHashFactory extends Object
register(String, TRHashProvider) method.| Modifier and Type | Class and Description |
|---|---|
static class |
TRHashFactory.FDHashProviderCallable |
| Modifier and Type | Method and Description |
|---|---|
String |
createHash(String input,
String signingKey) |
String |
createHash(String encryption,
String input,
String signingKey) |
String |
createPasswordHash(String input) |
String |
createPasswordHash(String encryption,
String input) |
Set<String> |
generateHashForAllProviders(String input)
The method is used to generate hash for all available providers in
parallel.
|
static TRHashFactory |
getInstance() |
static void |
register(String encryption,
TRHashProvider provider)
Use this method to register your custom hash provider.
|
protected static final Logger log
public static TRHashFactory getInstance()
public static void register(String encryption, TRHashProvider provider) throws TRHashProviderRegisterException
encryption - - a unique name for encryption e.g. Scryptprovider - - an implementation of TRHashProviderTRHashProviderRegisterException - - throws exception if a provider
is already registered for an encryption.public String createPasswordHash(String input) throws TRHashProviderException
TRHashProviderExceptionpublic String createPasswordHash(String encryption, String input) throws TRHashProviderException
TRHashProviderExceptionpublic String createHash(String input, String signingKey) throws TRHashProviderException
TRHashProviderExceptionpublic String createHash(String encryption, String input, String signingKey) throws TRHashProviderException
TRHashProviderExceptionCopyright © 2019. All rights reserved.