Loading…

Kryptel/Java

Hash Functions (package com.kryptel.hash_function)

Description

This package contains Kryptel hash functions, i.e. low-level components computing hash (or digest) of a data block or an arbitrary length data stream.

The standard Java library includes implementation for all those hash function, so Kryptel/Java components are just wrappers over the standard functions.

Hash Function Class Name Component ID
MD5 Md5 CID_HASH_MD5
SHA-1 Sha1 CID_HASH_SHA1
SHA-256 Sha256 CID_HASH_SHA256
SHA-384 Sha384 CID_HASH_SHA384
SHA-512 Sha512 CID_HASH_SHA512
Null hash function NullHashFunction CID_NULL_HASH_FUNCTION

Structures

HashFunctionInfo

A static structure describing the hash function variations.

HashFunctionParameters

A helper structure, used to pack hash function parameters in order to return them in a single function call.

Interfaces

Hash functions export three interface in addition to the standard component interfaces:

IHashFunction

The main interface, used for hashing data blocks of arbitrary size.

IHashFunctionParams

Gets or sets the hash function parameters.

IMemoryBlockHash

Hashes in-memory data.

Examples

Computing a File Digest

Computes digests of the specified file using all available hash functions.

Adding a New Hash Function

How to create a new hash function component and to add it to the library.