Advertisement
AnthonyCagliano

Untitled

Dec 12th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. struct cryptx_hash_sha256 {
  2. uint8_t data[64]; /**< holds sha-256 block for transformation */
  3. uint8_t datalen; /**< holds the current length of data in data[64] */
  4. uint8_t bitlen[8]; /**< holds the current length of transformed data */
  5. uint32_t state[8]; /**< holds hash state for transformed data */
  6. };
  7.  
  8. typedef union {
  9. struct cryptx_hash_sha256;
  10. } cryptx_hash_internal_h;
  11.  
  12.  
  13. struct cryptx_hash_ctx {
  14. bool (*init)(void* ctx);
  15. void (*update)(void* ctx, const void* data, size_t len);
  16. void (*final)(void* ctx, void* output);
  17. cryptx_hash_internal_h meta;
  18. uint8_t digest_len;
  19. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement