iPXE
Functions | Variables
sha224.c File Reference

SHA-224 algorithm. More...

#include <stdint.h>
#include <byteswap.h>
#include <ipxe/crypto.h>
#include <ipxe/sha256.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
static void sha224_init (void *ctx)
 Initialise SHA-224 algorithm. More...
 

Variables

static const struct sha256_digest sha224_init_digest
 SHA-224 initial digest values. More...
 
struct digest_algorithm sha224_algorithm
 SHA-224 algorithm. More...
 

Detailed Description

SHA-224 algorithm.

Definition in file sha224.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ sha224_init()

static void sha224_init ( void *  ctx)
static

Initialise SHA-224 algorithm.

Parameters
ctxSHA-224 context

Definition at line 56 of file sha224.c.

56  {
57  struct sha256_context *context = ctx;
58 
60 }
static const struct sha256_digest sha224_init_digest
SHA-224 initial digest values.
Definition: sha224.c:38
struct golan_eq_context ctx
Definition: CIB_PRM.h:28
#define SHA224_DIGEST_SIZE
SHA-224 digest size.
Definition: sha256.h:80
void sha256_family_init(struct sha256_context *context, const struct sha256_digest *init, size_t digestsize)
Initialise SHA-256 family algorithm.
Definition: sha256.c:92
An SHA-256 context.
Definition: sha256.h:61

References ctx, SHA224_DIGEST_SIZE, sha224_init_digest, and sha256_family_init().

Variable Documentation

◆ sha224_init_digest

const struct sha256_digest sha224_init_digest
static
Initial value:
= {
.h = {
cpu_to_be32 ( 0xc1059ed8 ),
cpu_to_be32 ( 0x367cd507 ),
cpu_to_be32 ( 0x3070dd17 ),
cpu_to_be32 ( 0xf70e5939 ),
cpu_to_be32 ( 0xffc00b31 ),
cpu_to_be32 ( 0x68581511 ),
cpu_to_be32 ( 0x64f98fa7 ),
cpu_to_be32 ( 0xbefa4fa4 ),
},
}
#define cpu_to_be32(value)
Definition: byteswap.h:110

SHA-224 initial digest values.

Definition at line 38 of file sha224.c.

Referenced by sha224_init().

◆ sha224_algorithm

struct digest_algorithm sha224_algorithm
Initial value:
= {
.name = "sha224",
.ctxsize = sizeof ( struct sha256_context ),
.blocksize = sizeof ( union sha256_block ),
.init = sha224_init,
.update = sha256_update,
.final = sha256_final,
}
static void sha224_init(void *ctx)
Initialise SHA-224 algorithm.
Definition: sha224.c:56
void sha256_update(void *ctx, const void *data, size_t len)
Accumulate data with SHA-256 algorithm.
Definition: sha256.c:216
An SHA-256 data block.
Definition: sha256.h:25
#define SHA224_DIGEST_SIZE
SHA-224 digest size.
Definition: sha256.h:80
uint32_t digestsize
Digest size (i.e.
Definition: pccrr.h:14
An SHA-256 context.
Definition: sha256.h:61
void sha256_final(void *ctx, void *out)
Generate SHA-256 digest.
Definition: sha256.c:239

SHA-224 algorithm.

Definition at line 63 of file sha224.c.

Referenced by sha256_test_exec().