yggm/libs/sha512.cuh
2025-03-15 04:42:31 +05:00

14 lines
679 B
Plaintext

#ifndef __SHA512_CUH
#define __SHA512_CUH
struct sha512_state {
unsigned long h[8];
};
extern __device__ __constant__ sha512_state sha512_initial_state;
extern __device__ __constant__ unsigned long round_k[80];
__device__ __forceinline__ unsigned long load64(const unsigned char* x);
__device__ __forceinline__ void store64(unsigned char* x, unsigned long v);
__device__ __forceinline__ unsigned long rot64(unsigned long x, int bits);
__device__ __forceinline__ void sha512_block(sha512_state* s, const unsigned char* blk);
__device__ void sha512_final(sha512_state* s, const unsigned char* blk);
__device__ void sha512_get(const sha512_state* s, unsigned char* hash);
#endif