Package com.mku.salmon.integrity
Interface IHashProvider
-
- All Known Implementing Classes:
HMACSHA256Provider
public interface IHashProvider
Interface for hashing providers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
calc(byte[] key, byte[] buffer, int offset, int count)
Calculate the hash for the data provided.
-
-
-
Method Detail
-
calc
byte[] calc(byte[] key, byte[] buffer, int offset, int count)
Calculate the hash for the data provided.- Parameters:
key
- The key to be used for hashing.buffer
- The buffer to read the data from.offset
- The position that reading will start from.count
- The count of bytes to read from.- Returns:
- The calculated hash.
- Throws:
IntegrityException
- thrown if hash cannot be calculated
-
-