Java org.apache.shiro.crypto.hash DefaultHashService fields, constructors, methods, implement or subclass

Example usage for Java org.apache.shiro.crypto.hash DefaultHashService fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.shiro.crypto.hash DefaultHashService.

The text is from its open source code.

Constructor

DefaultHashService()
Constructs a new DefaultHashService instance with the following defaults:
  • #setHashAlgorithmName(String) hashAlgorithmName = SHA-512
  • #setHashIterations(int) hashIterations = 1
  • #setRandomNumberGenerator(org.apache.shiro.crypto.RandomNumberGenerator) randomNumberGenerator = new SecureRandomNumberGenerator ()
  • #setGeneratePublicSalt(boolean) generatePublicSalt = false

If this hashService will be used for password hashing it is recommended to set the #setPrivateSalt(ByteSource) privateSalt and significantly increase the number of #setHashIterations(int) hashIterations .

Method

HashcomputeHash(HashRequest request)
Computes and responds with a hash based on the specified request.
ByteSourcegetPrivateSalt()
voidsetGeneratePublicSalt(boolean generatePublicSalt)
Sets whether or not a public salt should be randomly generated and used to compute a hash if a HashRequest does not specify a salt.
voidsetHashAlgorithmName(String name)
voidsetHashIterations(int count)
voidsetPrivateSalt(ByteSource privateSalt)
voidsetRandomNumberGenerator(RandomNumberGenerator rng)