Leancrypto 1.7.2
Post-Quantum Cryptographic Library
Macros | Variables
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. More...
 
#define LC_SHA512_CTX_ON_STACK(name)
 Allocate stack memory for the SHA512 context without VLA. More...
 

Variables

const struct lc_hash * lc_sha384
 SHA2-384 algorithm reference. More...
 
const struct lc_hash * lc_sha512
 SHA2-512 algorithm reference. More...
 

Macro Definition Documentation

◆ LC_SHA384_CTX_ON_STACK

#define LC_SHA384_CTX_ON_STACK (   name)
Value:
_Pragma("GCC diagnostic push") _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 76 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 \"-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

lc_sha384
extern

SHA2-384 algorithm reference.

◆ lc_sha512

lc_sha512
extern

SHA2-512 algorithm reference.