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