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

Detailed Description

MD5 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_md5_transform (MD5_CTX *ctx, const uint8_t data[])
 MD5 transformation rounds. More...
 
__device__ void cu_md5_init (MD5_CTX *ctx)
 Initialize a MD5 context. More...
 
__device__ void cu_md5_update (MD5_CTX *ctx, const void *in, size_t inlen)
 Add inlen bytes from in to a MD5 context for hashing. More...
 
__device__ void cu_md5_final (MD5_CTX *ctx, void *out)
 Finalize a MD5 message digest. More...
 
__device__ void cu_md5 (const void *in, size_t inlen, void *out)
 Convenient all-in-one MD5 computation. More...
 

Function Documentation

◆ cu_md5()

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

Convenient all-in-one MD5 computation.

Performs cu_md5_init(), cu_md5_update() and cu_md5_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_md5_final()

__device__ void cu_md5_final ( MD5_CTX ctx,
void *  out 
)

Finalize a MD5 message digest.

Generate the MD5 message digest and place in out.

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

◆ cu_md5_init()

__device__ void cu_md5_init ( MD5_CTX ctx)

Initialize a MD5 context.

Parameters
ctxPointer to MD5 context

◆ cu_md5_transform()

__device__ void cu_md5_transform ( MD5_CTX ctx,
const uint8_t  data[] 
)

MD5 transformation rounds.

Parameters
ctxPointer to MD5 context
dataPointer to input to be transformed

◆ cu_md5_update()

__device__ void cu_md5_update ( MD5_CTX ctx,
const void *  in,
size_t  inlen 
)

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

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