summaryrefslogtreecommitdiff
path: root/cipher.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-04-16 11:18:38 +1000
committerDamien Miller <djm@mindrot.org>2000-04-16 11:18:38 +1000
commit4af51306d9a51459a5bef922df1037f876ae51fe (patch)
tree09ecfc215fce82345a3259f8a0f384b9a67906f0 /cipher.h
parent5d1705ecf9bd3216dc99a84242bcdf2e7297d307 (diff)
- OpenBSD CVS updates.
[ssh.1 ssh.c] - ssh -2 [auth.c channels.c clientloop.c packet.c packet.h serverloop.c] [session.c sshconnect.c] - check payload for (illegal) extra data [ALL] - whitespace cleanup
Diffstat (limited to 'cipher.h')
-rw-r--r--cipher.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/cipher.h b/cipher.h
index 1112bffd9..383e3444f 100644
--- a/cipher.h
+++ b/cipher.h
@@ -1,17 +1,17 @@
1/* 1/*
2 * 2 *
3 * cipher.h 3 * cipher.h
4 * 4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * 6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 8 * All rights reserved
9 * 9 *
10 * Created: Wed Apr 19 16:50:42 1995 ylo 10 * Created: Wed Apr 19 16:50:42 1995 ylo
11 * 11 *
12 */ 12 */
13 13
14/* RCSID("$Id: cipher.h,v 1.10 2000/04/13 02:26:36 damien Exp $"); */ 14/* RCSID("$Id: cipher.h,v 1.11 2000/04/16 01:18:41 damien Exp $"); */
15 15
16#ifndef CIPHER_H 16#ifndef CIPHER_H
17#define CIPHER_H 17#define CIPHER_H
@@ -95,29 +95,29 @@ int ciphers_valid(const char *names);
95 * Selects the cipher to use and sets the key. If for_encryption is true, 95 * Selects the cipher to use and sets the key. If for_encryption is true,
96 * the key is setup for encryption; otherwise it is setup for decryption. 96 * the key is setup for encryption; otherwise it is setup for decryption.
97 */ 97 */
98void 98void
99cipher_set_key(CipherContext * context, int cipher, 99cipher_set_key(CipherContext * context, int cipher,
100 const unsigned char *key, int keylen); 100 const unsigned char *key, int keylen);
101void 101void
102cipher_set_key_iv(CipherContext * context, int cipher, 102cipher_set_key_iv(CipherContext * context, int cipher,
103 const unsigned char *key, int keylen, 103 const unsigned char *key, int keylen,
104 const unsigned char *iv, int ivlen); 104 const unsigned char *iv, int ivlen);
105 105
106/* 106/*
107 * Sets key for the cipher by computing the MD5 checksum of the passphrase, 107 * Sets key for the cipher by computing the MD5 checksum of the passphrase,
108 * and using the resulting 16 bytes as the key. 108 * and using the resulting 16 bytes as the key.
109 */ 109 */
110void 110void
111cipher_set_key_string(CipherContext * context, int cipher, 111cipher_set_key_string(CipherContext * context, int cipher,
112 const char *passphrase); 112 const char *passphrase);
113 113
114/* Encrypts data using the cipher. */ 114/* Encrypts data using the cipher. */
115void 115void
116cipher_encrypt(CipherContext * context, unsigned char *dest, 116cipher_encrypt(CipherContext * context, unsigned char *dest,
117 const unsigned char *src, unsigned int len); 117 const unsigned char *src, unsigned int len);
118 118
119/* Decrypts data using the cipher. */ 119/* Decrypts data using the cipher. */
120void 120void
121cipher_decrypt(CipherContext * context, unsigned char *dest, 121cipher_decrypt(CipherContext * context, unsigned char *dest,
122 const unsigned char *src, unsigned int len); 122 const unsigned char *src, unsigned int len);
123 123