Loading…

Kryptel/Java

IMemoryBlockHash interface

Declaration

package com.kryptel.hash_function;

public interface IMemoryBlockHash {
  byte[] HashBlock(final byte[] src, int start, int len) throws Exception;
  byte[] HashUtf8String(String str) throws Exception;
  byte[] HashWideString(String str) throws Exception;
}

Description

This interface is used for hashing single block of data residing in memory.

HashBlock

byte[] HashBlock(final byte[] src, int start, int len) throws Exception;

Hashes len bytes of data in src at position start and returns the computed hash value as a byte array.

HashUtf8String

byte[] HashUtf8String(String str) throws Exception;

Converts the argument string to UTF-8, hashes it, and returns the computed digest.

HashWideString

byte[] HashWideString(String str) throws Exception;

Converts the argument string to UTF-16, hashes it, and returns the computed digest.