digestpp 1.0
C++11 header-only message digest library
Loading...
Searching...
No Matches
JH

JH Algorithm More...

Typedefs

typedef hasher< detail::jh_provider<> > digestpp::jh
 JH hash function.
 
template<size_t N>
using digestpp::static_size::jh = hasher<detail::jh_provider<N>>
 JH hash function (static-size version)
 

Detailed Description

JH Algorithm

Typedef Documentation

◆ jh [1/2]

JH hash function.

SHA-3 competition finalist using bitslice design. Designed by Hongjun Wu.

JH is based on a 1024-bit internal state and uses bitslicing technique, which provides resistance to side-channel attacks and good performance on various platforms.

SHA-3 finalist (2012) - did not win but remains a secure alternative.

Type:
Cryptographic hash function.
Output size:
8 - 512 bits
Default size:
none
Exceptions
std::runtime_errorif the requested digest size is not divisible by 8 (full bytes), or is not within the supported range
Example:
// Output a 256-bit JH digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Main class template implementing the public API for hashing.
Definition hasher.hpp:38
std::string hexdigest() const
Return hex digest of absorbed data.
Definition hasher.hpp:372
hasher & absorb(const T *data, size_t len)
Absorbs bytes from a C-style pointer to character buffer.
Definition hasher.hpp:86
Example output:
6a049fed5fc6874acfdc4a08b568a4f8cbac27de933496f031015b38961608a0
See also
hasher, digestpp::static_size::jh

◆ jh [2/2]

template<size_t N>
using digestpp::static_size::jh = hasher<detail::jh_provider<N>>

JH hash function (static-size version)

Variant of JH with output size specified as template parameter.

Type:
Cryptographic hash function.
Output size:
8 - 512 bits
Example:
// Output a 256-bit JH digest of a string
hasher.absorb("The quick brown fox jumps over the lazy dog");
std::cout << hasher.hexdigest() << '\n';
Example output:
6a049fed5fc6874acfdc4a08b568a4f8cbac27de933496f031015b38961608a0
See also
hasher, digestpp::jh