=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/cipher.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- src/usr.bin/ssh/cipher.c 2000/04/12 09:39:10 1.25 +++ src/usr.bin/ssh/cipher.c 2000/04/14 10:30:30 1.26 @@ -1,18 +1,18 @@ /* - * + * * cipher.c - * + * * Author: Tatu Ylonen - * + * * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved - * + * * Created: Wed Apr 19 17:41:39 1995 ylo - * + * */ #include "includes.h" -RCSID("$Id: cipher.c,v 1.25 2000/04/12 09:39:10 markus Exp $"); +RCSID("$Id: cipher.c,v 1.26 2000/04/14 10:30:30 markus Exp $"); #include "ssh.h" #include "cipher.h" @@ -133,7 +133,7 @@ * supported cipher. */ -unsigned int +unsigned int cipher_mask1() { unsigned int mask = 0; @@ -141,7 +141,7 @@ mask |= 1 << SSH_CIPHER_BLOWFISH; return mask; } -unsigned int +unsigned int cipher_mask2() { unsigned int mask = 0; @@ -151,7 +151,7 @@ mask |= 1 << SSH_CIPHER_CAST128_CBC; return mask; } -unsigned int +unsigned int cipher_mask() { return cipher_mask1() | cipher_mask2(); @@ -213,7 +213,7 @@ * passphrase and using the resulting 16 bytes as the key. */ -void +void cipher_set_key_string(CipherContext *context, int cipher, const char *passphrase) { MD5_CTX md; @@ -231,7 +231,7 @@ /* Selects the cipher to use and sets the key. */ -void +void cipher_set_key(CipherContext *context, int cipher, const unsigned char *key, int keylen) { @@ -292,9 +292,9 @@ memset(padded, 0, sizeof(padded)); } -void +void cipher_set_key_iv(CipherContext * context, int cipher, - const unsigned char *key, int keylen, + const unsigned char *key, int keylen, const unsigned char *iv, int ivlen) { /* Set cipher type. */ @@ -352,7 +352,7 @@ /* Encrypts data using the cipher. */ -void +void cipher_encrypt(CipherContext *context, unsigned char *dest, const unsigned char *src, unsigned int len) { @@ -374,14 +374,14 @@ case SSH_CIPHER_BLOWFISH: swap_bytes(src, dest, len); BF_cbc_encrypt(dest, dest, len, - &context->u.bf.key, context->u.bf.iv, + &context->u.bf.key, context->u.bf.iv, BF_ENCRYPT); swap_bytes(dest, dest, len); break; case SSH_CIPHER_BLOWFISH_CBC: BF_cbc_encrypt((void *)src, dest, len, - &context->u.bf.key, context->u.bf.iv, + &context->u.bf.key, context->u.bf.iv, BF_ENCRYPT); break; @@ -407,7 +407,7 @@ /* Decrypts data using the cipher. */ -void +void cipher_decrypt(CipherContext *context, unsigned char *dest, const unsigned char *src, unsigned int len) {