summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_ofb_i.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_ofb_i.c')
-rw-r--r--src/lib/libcrypto/evp/e_ofb_i.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/e_ofb_i.c b/src/lib/libcrypto/evp/e_ofb_i.c
index 96c8afd9c8..389206ef36 100644
--- a/src/lib/libcrypto/evp/e_ofb_i.c
+++ b/src/lib/libcrypto/evp/e_ofb_i.c
@@ -60,19 +60,13 @@
60 60
61#include <stdio.h> 61#include <stdio.h>
62#include "cryptlib.h" 62#include "cryptlib.h"
63#include "evp.h" 63#include <openssl/evp.h>
64#include "objects.h" 64#include <openssl/objects.h>
65 65
66#ifndef NOPROTO
67static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 66static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc); 67 unsigned char *iv,int enc);
69static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 68static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl); 69 unsigned char *in, unsigned int inl);
71#else
72static void idea_ofb_init_key();
73static void idea_ofb_cipher();
74#endif
75
76static EVP_CIPHER i_ofb_cipher= 70static EVP_CIPHER i_ofb_cipher=
77 { 71 {
78 NID_idea_ofb64, 72 NID_idea_ofb64,
@@ -86,16 +80,13 @@ static EVP_CIPHER i_ofb_cipher=
86 EVP_CIPHER_get_asn1_iv, 80 EVP_CIPHER_get_asn1_iv,
87 }; 81 };
88 82
89EVP_CIPHER *EVP_idea_ofb() 83EVP_CIPHER *EVP_idea_ofb(void)
90 { 84 {
91 return(&i_ofb_cipher); 85 return(&i_ofb_cipher);
92 } 86 }
93 87
94static void idea_ofb_init_key(ctx,key,iv,enc) 88static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
95EVP_CIPHER_CTX *ctx; 89 unsigned char *iv, int enc)
96unsigned char *key;
97unsigned char *iv;
98int enc;
99 { 90 {
100 ctx->num=0; 91 ctx->num=0;
101 92
@@ -106,11 +97,8 @@ int enc;
106 idea_set_encrypt_key(key,&(ctx->c.idea_ks)); 97 idea_set_encrypt_key(key,&(ctx->c.idea_ks));
107 } 98 }
108 99
109static void idea_ofb_cipher(ctx,out,in,inl) 100static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
110EVP_CIPHER_CTX *ctx; 101 unsigned char *in, unsigned int inl)
111unsigned char *out;
112unsigned char *in;
113unsigned int inl;
114 { 102 {
115 idea_ofb64_encrypt( 103 idea_ofb64_encrypt(
116 in,out,(long)inl, 104 in,out,(long)inl,