Leancrypto 1.6.0
Post-Quantum Cryptographic Library
Loading...
Searching...
No Matches
lc_sha512.h File Reference
#include "lc_hash.h"
Include dependency graph for lc_sha512.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LC_SHA384_CTX_ON_STACK(name)
 Allocate stack memory for the SHA384 context without VLA.
#define LC_SHA512_CTX_ON_STACK(name)
 Allocate stack memory for the SHA512 context without VLA.

Variables

const struct lc_hashlc_sha384
 SHA2-384 algorithm reference.
const struct lc_hashlc_sha512
 SHA2-512 algorithm reference.

Macro Definition Documentation

◆ LC_SHA384_CTX_ON_STACK

#define LC_SHA384_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wvla\"") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, LC_SHA384_CTX_SIZE, \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA384_CTX(name); \
_Pragma("GCC diagnostic pop")
#define LC_ALIGNED_BUFFER(name, size, alignment)
Allocate aligned stack memory.

Allocate stack memory for the SHA384 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 75 of file lc_sha512.h.

◆ LC_SHA512_CTX_ON_STACK

#define LC_SHA512_CTX_ON_STACK ( name)
Value:
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wvla\"") _Pragma( \
"GCC diagnostic ignored \"-Wdeclaration-after-statement\"") \
LC_ALIGNED_BUFFER(name##_ctx_buf, LC_SHA512_CTX_SIZE, \
LC_HASH_COMMON_ALIGNMENT); \
struct lc_hash_ctx *name = (struct lc_hash_ctx *)name##_ctx_buf; \
LC_SHA512_CTX(name); \
_Pragma("GCC diagnostic pop")

Allocate stack memory for the SHA512 context without VLA.

Parameters
[in]nameName of the stack variable

Definition at line 90 of file lc_sha512.h.

Variable Documentation

◆ lc_sha384

const struct lc_hash* lc_sha384
extern

SHA2-384 algorithm reference.

◆ lc_sha512

const struct lc_hash* lc_sha512
extern

SHA2-512 algorithm reference.