#include <XrdOucSHA3.hh>
|
struct | sha3_ctx_t |
| SHA3 state context used by all methods (OpenSSL - like interface) More...
|
|
|
static void * | Calc (const void *in, size_t inlen, void *md, MDLen mdlen) |
|
static void | Init (sha3_ctx_t *c, MDLen mdlen) |
|
static void | Update (sha3_ctx_t *c, const void *data, size_t len) |
|
static void | Final (sha3_ctx_t *c, void *md) |
|
static void | SHAKE128_Init (sha3_ctx_t *c) |
|
static void | SHAKE256_Init (sha3_ctx_t *c) |
|
static void | SHAKE_Update (sha3_ctx_t *c, const void *data, size_t len) |
|
static void | SHAKE_Out (sha3_ctx_t *c, void *out, size_t len) |
|
◆ MDLen
SHA3 digest lengths (bits to bytes).
Enumerator |
---|
SHA3_128 | |
SHA3_224 | |
SHA3_256 | |
SHA3_384 | |
SHA3_512 | |
◆ XrdOucSHA3()
XrdOucSHA3::XrdOucSHA3 |
( |
| ) |
|
|
inline |
◆ ~XrdOucSHA3()
XrdOucSHA3::~XrdOucSHA3 |
( |
| ) |
|
|
inline |
◆ Calc()
static void * XrdOucSHA3::Calc |
( |
const void * |
in, |
|
|
size_t |
inlen, |
|
|
void * |
md, |
|
|
MDLen |
mdlen |
|
) |
| |
|
static |
Compute a sha3 hash (md) of given byte length from "in" (one time call).
- Parameters
-
in | Pointer to input data. |
inlen | Length of data in bytes. |
md | Pointer to mbuffer of size SHA3_xxx to receive result. |
mdlen | Message digest byte length (one of the listed enums). |
- Returns
- Pointer to md.
◆ Final()
static void XrdOucSHA3::Final |
( |
sha3_ctx_t * |
c, |
|
|
void * |
md |
|
) |
| |
|
static |
Return final message digest.
- Parameters
-
c | Pointer to context. |
md | Pointer to buffer of size SHA3_xxx to receive result. |
◆ Init()
Initialize context in prepration for computing SHA3 checksum.
- Parameters
-
c | Pointer to context. |
mdlen | Message digest byte length (one of the listed enums). |
Referenced by SHAKE128_Init(), and SHAKE256_Init().
◆ sha3_keccakf()
static void XrdOucSHA3::sha3_keccakf |
( |
uint64_t |
st[25] | ) |
|
|
staticprivate |
◆ SHAKE128_Init()
static void XrdOucSHA3::SHAKE128_Init |
( |
sha3_ctx_t * |
c | ) |
|
|
inlinestatic |
Initialize context to compute an extensible hash using a SHA3_128 digest.
- Parameters
-
References Init(), and SHA3_128.
◆ SHAKE256_Init()
static void XrdOucSHA3::SHAKE256_Init |
( |
sha3_ctx_t * |
c | ) |
|
|
inlinestatic |
Initialize context to compute an extensible hash using a SHA3_256 digest.
- Parameters
-
References Init(), and SHA3_256.
◆ SHAKE_Out()
static void XrdOucSHA3::SHAKE_Out |
( |
sha3_ctx_t * |
c, |
|
|
void * |
out, |
|
|
size_t |
len |
|
) |
| |
|
static |
Return final message digest of desired length. This function may be called iteratively to get as many bits as needed. Bits beyound MDLen form a pseudo-random sequence (i.e. are repeatable with the same input).
- Parameters
-
c | Pointer to context. |
out | Pointer to buffer of size len to receive result. |
len | The number of digest bytes to return. |
◆ SHAKE_Update()
static void XrdOucSHA3::SHAKE_Update |
( |
sha3_ctx_t * |
c, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinestatic |
Update shake digest with data.
- Parameters
-
c | Pointer to context. |
data | Pointer to data. |
len | Length of data in bytes. |
References Update().
◆ shake_xof()
static void XrdOucSHA3::shake_xof |
( |
sha3_ctx_t * |
c | ) |
|
|
staticprivate |
◆ Update()
static void XrdOucSHA3::Update |
( |
sha3_ctx_t * |
c, |
|
|
const void * |
data, |
|
|
size_t |
len |
|
) |
| |
|
static |
Update digest with data.
- Parameters
-
c | Pointer to context. |
data | Pointer to data. |
len | Length of data in bytes. |
Referenced by SHAKE_Update().
The documentation for this class was generated from the following file: