Class Sha256HashingService
java.lang.Object
ch.tocco.nice2.persist.s3storage.impl.Sha256HashingService
- All Implemented Interfaces:
BinaryHashingService
An implementation of
BinaryHashingService
which uses SHA-256 and Base-64.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.persist.core.api.binary.BinaryHashingService
BinaryHashingService.ToStringGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.hash.HashCode
fromString
(String hash) converts a hash from its string representation to aHashCode
objectcom.google.common.hash.HashFunction
-
Constructor Details
-
Sha256HashingService
public Sha256HashingService()
-
-
Method Details
-
hashFunction
public com.google.common.hash.HashFunction hashFunction()- Specified by:
hashFunction
in interfaceBinaryHashingService
- Returns:
- hash algorithm to be used
-
fromString
Description copied from interface:BinaryHashingService
converts a hash from its string representation to aHashCode
object- Specified by:
fromString
in interfaceBinaryHashingService
- Parameters:
hash
- string representation- Returns:
- a
HashCode
instance
-
getStringGenerator
- Specified by:
getStringGenerator
in interfaceBinaryHashingService
-