projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enc doesn't support AEAD ciphers.
[openssl.git]
/
crypto
/
des
/
ecb_enc.c
diff --git
a/crypto/des/ecb_enc.c
b/crypto/des/ecb_enc.c
index 199d87289a0b20a42178f27e93bfe657ffdbea5e..0684e769b3e0892db41e1e8b716861721e296e6c 100644
(file)
--- a/
crypto/des/ecb_enc.c
+++ b/
crypto/des/ecb_enc.c
@@
-57,13
+57,14
@@
*/
#include "des_locl.h"
*/
#include "des_locl.h"
-#include "
sp
r.h"
+#include "
des_ve
r.h"
#include <openssl/opensslv.h>
#include <openssl/opensslv.h>
+#include <openssl/bio.h>
-
GLOBAL const char *libdes_version="libdes v 3.24 - 20-Apr-1996 - eay"
;
-
GLOBAL const char *DES_version
="DES" OPENSSL_VERSION_PTEXT;
+
OPENSSL_GLOBAL const char libdes_version[]="libdes" OPENSSL_VERSION_PTEXT
;
+
OPENSSL_GLOBAL const char DES_version[]
="DES" OPENSSL_VERSION_PTEXT;
-const char *
des
_options(void)
+const char *
DES
_options(void)
{
static int init=1;
static char buf[32];
{
static int init=1;
static char buf[32];
@@
-90,30
+91,32
@@
const char *des_options(void)
#ifdef DES_UNROLL
unroll="16";
#else
#ifdef DES_UNROLL
unroll="16";
#else
- unroll="
4
";
+ unroll="
2
";
#endif
if (sizeof(DES_LONG) != sizeof(long))
size="int";
else
size="long";
#endif
if (sizeof(DES_LONG) != sizeof(long))
size="int";
else
size="long";
- sprintf(buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,size);
+ BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+ size);
init=0;
}
return(buf);
}
init=0;
}
return(buf);
}
-void
des_ecb_encrypt(const des_cblock in, des_cblock out, des_key_schedule ks
,
- int enc)
+void
DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output
,
+
DES_key_schedule *ks,
int enc)
{
register DES_LONG l;
DES_LONG ll[2];
{
register DES_LONG l;
DES_LONG ll[2];
+ const unsigned char *in = &(*input)[0];
+ unsigned char *out = &(*output)[0];
c2l(in,l); ll[0]=l;
c2l(in,l); ll[1]=l;
c2l(in,l); ll[0]=l;
c2l(in,l); ll[1]=l;
-
des_encrypt
(ll,ks,enc);
+
DES_encrypt1
(ll,ks,enc);
l=ll[0]; l2c(l,out);
l=ll[1]; l2c(l,out);
l=ll[0]=ll[1]=0;
}
l=ll[0]; l2c(l,out);
l=ll[1]; l2c(l,out);
l=ll[0]=ll[1]=0;
}
-