Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | /* |
michael@0 | 6 | * Provide FIPS validated hashing for applications that only need hashing. |
michael@0 | 7 | * NOTE: mac'ing requires keys and will not work in this interface. |
michael@0 | 8 | * Also NOTE: this only works with Hashing. Only the FIPS interface is enabled. |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | typedef struct NSSLOWInitContextStr NSSLOWInitContext; |
michael@0 | 12 | typedef struct NSSLOWHASHContextStr NSSLOWHASHContext; |
michael@0 | 13 | |
michael@0 | 14 | NSSLOWInitContext *NSSLOW_Init(void); |
michael@0 | 15 | void NSSLOW_Shutdown(NSSLOWInitContext *context); |
michael@0 | 16 | void NSSLOW_Reset(NSSLOWInitContext *context); |
michael@0 | 17 | NSSLOWHASHContext *NSSLOWHASH_NewContext( |
michael@0 | 18 | NSSLOWInitContext *initContext, |
michael@0 | 19 | HASH_HashType hashType); |
michael@0 | 20 | void NSSLOWHASH_Begin(NSSLOWHASHContext *context); |
michael@0 | 21 | void NSSLOWHASH_Update(NSSLOWHASHContext *context, |
michael@0 | 22 | const unsigned char *buf, |
michael@0 | 23 | unsigned int len); |
michael@0 | 24 | void NSSLOWHASH_End(NSSLOWHASHContext *context, |
michael@0 | 25 | unsigned char *buf, |
michael@0 | 26 | unsigned int *ret, unsigned int len); |
michael@0 | 27 | void NSSLOWHASH_Destroy(NSSLOWHASHContext *context); |
michael@0 | 28 | unsigned int NSSLOWHASH_Length(NSSLOWHASHContext *context); |