Macros | Functions | Variables
SHA1.c File Reference
#include "SHA1.h"
#include <string.h>
Include dependency graph for SHA1.c:

Go to the source code of this file.

Macros

#define ROTATE_LEFT32(a, n)   (((a) << (n)) | ((a) >> (32 - (n))))
 

Functions

int SHA1_Final (unsigned char *md, SHA_CTX *ctx)
 
int SHA1_Init (SHA_CTX *ctx)
 
static void SHA1_ProcessBlock (SHA_CTX *ctx)
 
int SHA1_Update (SHA_CTX *ctx, const void *data, size_t len)
 

Variables

static unsigned char pad [64]
 

Macro Definition Documentation

#define ROTATE_LEFT32 (   a,
 
)    (((a) << (n)) | ((a) >> (32 - (n))))

Definition at line 94 of file SHA1.c.

Function Documentation

int SHA1_Final ( unsigned char *  md,
SHA_CTX ctx 
)

Produce final SHA1 hash

Parameters
[out]mdSHA1 hash produced (must be atleast SHA1_DIGEST_LENGTH in length)
[in,out]ctxhashing context structure
See also
SHA1_Init
SHA1_Final

Definition at line 139 of file SHA1.c.

int SHA1_Init ( SHA_CTX ctx)

Initializes the SHA1 hashing algorithm

Parameters
[in,out]ctxhashing context structure
See also
SHA1_Update
SHA1_Final

Definition at line 77 of file SHA1.c.

static void SHA1_ProcessBlock ( SHA_CTX ctx)
static

Definition at line 95 of file SHA1.c.

int SHA1_Update ( SHA_CTX ctx,
const void *  data,
size_t  len 
)

Updates a block to the SHA1 hash

Parameters
[in,out]ctxhashing context structure
[in]datablock of data to hash
[in]lenlength of block to hash
See also
SHA1_Init
SHA1_Final

Definition at line 173 of file SHA1.c.

Variable Documentation

unsigned char pad[64]
static
Initial value:
= {
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 66 of file SHA1.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:49