CRYPTO-C v1.1.3
C/C++ Documentation
md2.h File Reference

Go to the source code of this file.

#include "utildev.h"

Detailed Description

MD2 hash function support.

This file is based on Brad Conte's basic implementations of cryptography algorithms...

https://github.com/B-Con/crypto-algorithms

... which was released into the Public Domain.

Macros

#define MD2LEN   16
 MD2 message digest length, in bytes.
 

Data Structures

struct  MD2_CTX
 

Functions

void md2_init (MD2_CTX *ctx)
 Initialize a MD2 context. More...
 
void md2_update (MD2_CTX *ctx, const void *in, size_t inlen)
 Add inlen bytes from in to a MD2 context for hashing. More...
 
void md2_final (MD2_CTX *ctx, void *out)
 Finalize a MD2 message digest. More...
 
void md2 (const void *in, size_t inlen, void *out)
 Convenient all-in-one MD2 computation. More...
 

Function Documentation

◆ md2()

void md2 ( const void *  in,
size_t  inlen,
void *  out 
)

Convenient all-in-one MD2 computation.

Performs md2_init(), md2_update() and md2_final(), and places the resulting hash in out.

Parameters
inPointer to data to hash
inlenLength of in data, in bytes
outPointer to location to place the message digest

◆ md2_final()

void md2_final ( MD2_CTX ctx,
void *  out 
)

Finalize a MD2 message digest.

Generate the MD2 message digest and place in out.

Parameters
ctxPointer to MD2 context
outPointer to location to place the message digest

◆ md2_init()

void md2_init ( MD2_CTX ctx)

Initialize a MD2 context.

Parameters
ctxPointer to MD2 context

◆ md2_update()

void md2_update ( MD2_CTX ctx,
const void *  in,
size_t  inlen 
)

Add inlen bytes from in to a MD2 context for hashing.

Parameters
ctxPointer to MD2 context
inPointer to data to hash
inlenLength of in data, in bytes