![]() |
CRYPTO-C v1.1.3
C/C++ Documentation
|
#include "sha1.h"
SHA1 CUDA hash function support.
This file is based on Brad Conte's basic implementations of cryptography algorithms...
... and alterations to the transform function were based on Steve Reid's SHA1 implementation...
... both of which were released into the Public Domain.
Functions | |
__device__ void | cu_sha1_transform (SHA1_CTX *ctx, const uint8_t data[]) |
SHA1 transformation rounds. More... | |
__device__ void | cu_sha1_init (SHA1_CTX *ctx) |
Initialize a SHA1 context. More... | |
__device__ void | cu_sha1_update (SHA1_CTX *ctx, const void *in, size_t inlen) |
Add inlen bytes from in to a SHA1 context for hashing. More... | |
__device__ void | cu_sha1_final (SHA1_CTX *ctx, void *out) |
Finalize a SHA1 message digest. More... | |
__device__ void | cu_sha1 (const void *in, size_t inlen, void *out) |
Convenient all-in-one SHA1 computation. More... | |
__device__ void cu_sha1 | ( | const void * | in, |
size_t | inlen, | ||
void * | out | ||
) |
Convenient all-in-one SHA1 computation.
Performs cu_sha1_init(), cu_sha1_update() and cu_sha1_final(), and places the resulting hash in out.
in | Pointer to data to hash |
inlen | Length of in data, in bytes |
out | Pointer to location to place the message digest |
__device__ void cu_sha1_final | ( | SHA1_CTX * | ctx, |
void * | out | ||
) |
Finalize a SHA1 message digest.
Generate the SHA1 message digest and place in out.
ctx | Pointer to SHA1 context |
out | Pointer to location to place the message digest |
__device__ void cu_sha1_init | ( | SHA1_CTX * | ctx | ) |
Initialize a SHA1 context.
ctx | Pointer to SHA1 context |
__device__ void cu_sha1_transform | ( | SHA1_CTX * | ctx, |
const uint8_t | data[] | ||
) |
SHA1 transformation rounds.
ctx | Pointer to SHA1 context |
data | Pointer to input to be transformed |
SHA1 transformation constant.
__device__ void cu_sha1_update | ( | SHA1_CTX * | ctx, |
const void * | in, | ||
size_t | inlen | ||
) |
Add inlen bytes from in to a SHA1 context for hashing.
ctx | Pointer to SHA1 context |
in | Pointer to data to hash |
inlen | Length of in data, in bytes |