Loading…

Kryptel/Java

IHashFunction interface

Declaration

package com.kryptel.hash_function;

public interface IHashFunction {
  void Init() throws Exception;
  void Hash(byte[] src, int start, int len) throws Exception;
  byte[] Done() throws Exception;
}

Description

This interface is used for hashing data stream of arbitrary length.

Init

void Init() throws Exception;

Initializes the hash function and prepares it for a new session.

Hash

void Hash(byte[] src, int start, int len) throws Exception;

Hashes len bytes of data in src at position start.

Done

byte[] Done() throws Exception;

Finishes processing, resets the hash function to the idle state, and returns the computed digest.