1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /* 6 * Provide FIPS validated hashing for applications that only need hashing. 7 * NOTE: mac'ing requires keys and will not work in this interface. 8 * Also NOTE: this only works with Hashing. Only the FIPS interface is enabled. 9 */ 10 11 #ifndef _NSSLOWHASH_H_ 12 #define _NSSLOWHASH_H_ 13 14 typedef struct NSSLOWInitContextStr NSSLOWInitContext; 15 typedef struct NSSLOWHASHContextStr NSSLOWHASHContext; 16 17 NSSLOWInitContext *NSSLOW_Init(void); 18 void NSSLOW_Shutdown(NSSLOWInitContext *context); 19 void NSSLOW_Reset(NSSLOWInitContext *context); 20 NSSLOWHASHContext *NSSLOWHASH_NewContext( 21 NSSLOWInitContext *initContext, 22 HASH_HashType hashType); 23 void NSSLOWHASH_Begin(NSSLOWHASHContext *context); 24 void NSSLOWHASH_Update(NSSLOWHASHContext *context, 25 const unsigned char *buf, 26 unsigned int len); 27 void NSSLOWHASH_End(NSSLOWHASHContext *context, 28 unsigned char *buf, 29 unsigned int *ret, unsigned int len); 30 void NSSLOWHASH_Destroy(NSSLOWHASHContext *context); 31 unsigned int NSSLOWHASH_Length(NSSLOWHASHContext *context); 32 33 #endif 34