1e5b75505Sopenharmony_ci/* 2e5b75505Sopenharmony_ci * SHA-512 internal definitions 3e5b75505Sopenharmony_ci * Copyright (c) 2015, Pali Rohár <pali.rohar@gmail.com> 4e5b75505Sopenharmony_ci * 5e5b75505Sopenharmony_ci * This software may be distributed under the terms of the BSD license. 6e5b75505Sopenharmony_ci * See README for more details. 7e5b75505Sopenharmony_ci */ 8e5b75505Sopenharmony_ci 9e5b75505Sopenharmony_ci#ifndef SHA512_I_H 10e5b75505Sopenharmony_ci#define SHA512_I_H 11e5b75505Sopenharmony_ci 12e5b75505Sopenharmony_ci#define SHA512_BLOCK_SIZE 128 13e5b75505Sopenharmony_ci 14e5b75505Sopenharmony_cistruct sha512_state { 15e5b75505Sopenharmony_ci u64 length, state[8]; 16e5b75505Sopenharmony_ci u32 curlen; 17e5b75505Sopenharmony_ci u8 buf[SHA512_BLOCK_SIZE]; 18e5b75505Sopenharmony_ci}; 19e5b75505Sopenharmony_ci 20e5b75505Sopenharmony_civoid sha512_init(struct sha512_state *md); 21e5b75505Sopenharmony_ciint sha512_process(struct sha512_state *md, const unsigned char *in, 22e5b75505Sopenharmony_ci unsigned long inlen); 23e5b75505Sopenharmony_ciint sha512_done(struct sha512_state *md, unsigned char *out); 24e5b75505Sopenharmony_ci 25e5b75505Sopenharmony_ci#endif /* SHA512_I_H */ 26