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

Side by Side Diff: nss/lib/freebl/des.h

Issue 2078763002: Delete bundled copy of NSS and replace with README. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss@master
Patch Set: Delete bundled copy of NSS and replace with README. Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « nss/lib/freebl/cts.c ('k') | nss/lib/freebl/des.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * des.h
3 *
4 * header file for DES-150 library
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9
10 #ifndef _DES_H_
11 #define _DES_H_ 1
12
13 #include "blapi.h"
14
15 typedef unsigned char BYTE;
16 typedef unsigned int HALF;
17
18 #define HALFPTR(x) ((HALF *)(x))
19 #define SHORTPTR(x) ((unsigned short *)(x))
20 #define BYTEPTR(x) ((BYTE *)(x))
21
22 typedef enum {
23 DES_ENCRYPT = 0x5555,
24 DES_DECRYPT = 0xAAAA
25 } DESDirection;
26
27 typedef void DESFunc(struct DESContextStr *cx, BYTE *out, const BYTE *in,
28 unsigned int len);
29
30 struct DESContextStr {
31 /* key schedule, 16 internal keys, each with 8 6-bit parts */
32 HALF ks0 [32];
33 HALF ks1 [32];
34 HALF ks2 [32];
35 HALF iv [2];
36 DESDirection direction;
37 DESFunc *worker;
38 };
39
40 void DES_MakeSchedule( HALF * ks, const BYTE * key, DESDirection direction);
41 void DES_Do1Block( HALF * ks, const BYTE * inbuf, BYTE * outbuf);
42
43 #endif
OLDNEW
« no previous file with comments | « nss/lib/freebl/cts.c ('k') | nss/lib/freebl/des.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698