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

Side by Side Diff: crypto/rc4.h

Issue 660204: Upgrade to tpm-emulator version 0.7. (Closed)
Patch Set: Created 10 years, 10 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 | « crypto/hmac.c ('k') | crypto/rc4.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Software-Based Trusted Platform Module (TPM) Emulator for Linux 1 /* Software-based Trusted Platform Module (TPM) Emulator
2 * Copyright (C) 2004 Mario Strasser <mast@gmx.net>, 2 * Copyright (C) 2004-2010 Mario Strasser <mast@gmx.net>
3 * Swiss Federal Institute of Technology (ETH) Zurich
4 * 3 *
5 * This module is free software; you can redistribute it and/or modify 4 * This module is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 2 of the License, 6 * by the Free Software Foundation; either version 2 of the License,
8 * or (at your option) any later version. 7 * or (at your option) any later version.
9 * 8 *
10 * This module is distributed in the hope that it will be useful, 9 * This module is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 12 * GNU General Public License for more details.
14 * 13 *
15 * $Id$ 14 * $Id: rc4.h 364 2010-02-11 10:24:45Z mast $
16 */ 15 */
17 16
18 #ifndef _RC4_H_ 17 #ifndef _RC4_H_
19 #define _RC4_H_ 18 #define _RC4_H_
20 19
21 #include <stddef.h> 20 #include <stddef.h>
22 #include <stdint.h> 21 #include <stdint.h>
23 22
24 typedef struct { 23 typedef struct {
25 uint8_t state[256]; 24 uint8_t state[256];
26 uint8_t x, y; 25 uint8_t x, y;
27 } tpm_rc4_ctx_t; 26 } tpm_rc4_ctx_t;
28 27
29 void tpm_rc4_init(tpm_rc4_ctx_t *s, uint8_t *key, size_t key_len); 28 void tpm_rc4_init(tpm_rc4_ctx_t *s, uint8_t *key, size_t key_len);
30 29
31 void tpm_rc4_crypt(tpm_rc4_ctx_t *s, uint8_t *in, uint8_t *out, size_t length); 30 void tpm_rc4_crypt(tpm_rc4_ctx_t *s, uint8_t *in, uint8_t *out, size_t length);
32 31
33 #endif /* _RC4_h_ */ 32 #endif /* _RC4_h_ */
OLDNEW
« no previous file with comments | « crypto/hmac.c ('k') | crypto/rc4.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698