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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.hash.HashCodefromString(String hash) converts a hash from its string representation to aHashCodeobjectcom.google.common.hash.HashFunction
-
Constructor Details
-
Sha256HashingService
public Sha256HashingService()
-
-
Method Details
-
hashFunction
public com.google.common.hash.HashFunction hashFunction()- Specified by:
hashFunctionin interfaceBinaryHashingService- Returns:
- hash algorithm to be used
-
fromString
Description copied from interface:BinaryHashingServiceconverts a hash from its string representation to aHashCodeobject- Specified by:
fromStringin interfaceBinaryHashingService- Parameters:
hash- string representation- Returns:
- a
HashCodeinstance
-
getStringGenerator
- Specified by:
getStringGeneratorin interfaceBinaryHashingService
-