Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: nss/mozilla/security/nss/lib/freebl/rijndael.h

Issue 11193042: Update NSS to NSS 3.14 RC1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: nss/mozilla/security/nss/lib/freebl/rijndael.h
===================================================================
--- nss/mozilla/security/nss/lib/freebl/rijndael.h (revision 162724)
+++ nss/mozilla/security/nss/lib/freebl/rijndael.h (working copy)
@@ -1,19 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-/* $Id: rijndael.h,v 1.12 2012/04/25 14:49:43 gerv%gerv.net Exp $ */
+/* $Id: rijndael.h,v 1.13 2012/09/28 22:46:32 rrelyea%redhat.com Exp $ */
#ifndef _RIJNDAEL_H_
#define _RIJNDAEL_H_ 1
+#include "blapii.h"
+
#define RIJNDAEL_MIN_BLOCKSIZE 16 /* bytes */
#define RIJNDAEL_MAX_BLOCKSIZE 32 /* bytes */
-typedef SECStatus AESFunc(AESContext *cx, unsigned char *output,
- unsigned int *outputLen, unsigned int maxOutputLen,
- const unsigned char *input, unsigned int inputLen,
- unsigned int blocksize);
-
typedef SECStatus AESBlockFunc(AESContext *cx,
unsigned char *output,
const unsigned char *input);
@@ -49,15 +46,23 @@
* Nb - the number of bytes in a block, specified by user
* Nr - the number of rounds, specified by a table
* expandedKey - the round keys in 4-byte words, the length is Nr * Nb
- * worker - the encryption/decryption function to use with this context
+ * worker - the encryption/decryption function to use with worker_cx
+ * destroy - if not NULL, the destroy function to use with worker_cx
+ * worker_cx - the context for worker and destroy
+ * isBlock - is the mode of operation a block cipher or a stream cipher?
*/
struct AESContextStr
{
unsigned int Nb;
unsigned int Nr;
- AESFunc *worker;
+ freeblCipherFunc worker;
+ /* NOTE: The offsets of iv and expandedKey are hardcoded in intel-aes.s.
+ * Don't add new members before them without updating intel-aes.s. */
unsigned char iv[RIJNDAEL_MAX_BLOCKSIZE];
PRUint32 expandedKey[RIJNDAEL_MAX_EXP_KEY_SIZE];
+ freeblDestroyFunc destroy;
+ void *worker_cx;
+ PRBool isBlock;
};
#endif /* _RIJNDAEL_H_ */

Powered by Google App Engine
This is Rietveld 408576698