michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * Provide FIPS validated hashing for applications that only need hashing. michael@0: * NOTE: mac'ing requires keys and will not work in this interface. michael@0: * Also NOTE: this only works with Hashing. Only the FIPS interface is enabled. michael@0: */ michael@0: michael@0: typedef struct NSSLOWInitContextStr NSSLOWInitContext; michael@0: typedef struct NSSLOWHASHContextStr NSSLOWHASHContext; michael@0: michael@0: NSSLOWInitContext *NSSLOW_Init(void); michael@0: void NSSLOW_Shutdown(NSSLOWInitContext *context); michael@0: void NSSLOW_Reset(NSSLOWInitContext *context); michael@0: NSSLOWHASHContext *NSSLOWHASH_NewContext( michael@0: NSSLOWInitContext *initContext, michael@0: HASH_HashType hashType); michael@0: void NSSLOWHASH_Begin(NSSLOWHASHContext *context); michael@0: void NSSLOWHASH_Update(NSSLOWHASHContext *context, michael@0: const unsigned char *buf, michael@0: unsigned int len); michael@0: void NSSLOWHASH_End(NSSLOWHASHContext *context, michael@0: unsigned char *buf, michael@0: unsigned int *ret, unsigned int len); michael@0: void NSSLOWHASH_Destroy(NSSLOWHASHContext *context); michael@0: unsigned int NSSLOWHASH_Length(NSSLOWHASHContext *context);