CRYPTO-C v1.1.3
C/C++ Documentation
md2.cuh File Reference
#include "md2.h"

Detailed Description

MD2 CUDA 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.

Functions

__device__ void cu_md2_transform (MD2_CTX *ctx, uint8_t data[])
 MD2 transformation rounds. More...
 
__device__ void cu_md2_init (MD2_CTX *ctx)
 Initialize a MD2 context. More...
 
__device__ void cu_md2_update (MD2_CTX *ctx, const void *in, size_t inlen)
 Add inlen bytes from in to a MD2 context for hashing. More...
 
__device__ void cu_md2_final (MD2_CTX *ctx, void *out)
 Finalize a MD2 message digest. More...
 
__device__ void cu_md2 (const void *in, size_t inlen, void *out)
 Convenient all-in-one MD2 computation. More...
 

Function Documentation

◆ cu_md2()

__device__ void cu_md2 ( const void *  in,
size_t  inlen,
void *  out 
)

Convenient all-in-one MD2 computation.

Performs cu_md2_init(), cu_md2_update() and cu_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

◆ cu_md2_final()

__device__ void cu_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

◆ cu_md2_init()

__device__ void cu_md2_init ( MD2_CTX ctx)

Initialize a MD2 context.

Parameters
ctxPointer to MD2 context

◆ cu_md2_transform()

__device__ void cu_md2_transform ( MD2_CTX ctx,
uint8_t  data[] 
)

MD2 transformation rounds.

Parameters
ctxPointer to MD2 context
dataPointer to input to be transformed

MD2 transformation constant.

◆ cu_md2_update()

__device__ void cu_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