2025-03-14 22:52:59 +05:00
|
|
|
#ifndef __SHA512_CUH
|
|
|
|
#define __SHA512_CUH
|
2025-03-13 04:09:27 +05:00
|
|
|
struct sha512_state {
|
2025-03-13 19:43:54 +05:00
|
|
|
unsigned long h[8];
|
2025-03-13 04:09:27 +05:00
|
|
|
};
|
2025-03-14 22:52:59 +05:00
|
|
|
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);
|
2025-03-15 01:38:00 +05:00
|
|
|
__device__ __forceinline__ void sha512_block(sha512_state* s, const unsigned char* blk);
|
2025-03-14 22:52:59 +05:00
|
|
|
__device__ void sha512_final(sha512_state* s, const unsigned char* blk, unsigned long total_size);
|
|
|
|
__device__ void sha512_get(const sha512_state* s, unsigned char* hash, unsigned int offset, unsigned int len);
|
|
|
|
__device__ void sha512_init(sha512_state* s);
|
|
|
|
#endif
|