summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/ecb_enc.c
diff options
context:
space:
mode:
authordjm <>2010-10-01 22:59:01 +0000
committerdjm <>2010-10-01 22:59:01 +0000
commitfe047d8b632246cb2db3234a0a4f32e5c318857b (patch)
tree939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/des/ecb_enc.c
parent2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff)
downloadopenbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2
openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libcrypto/des/ecb_enc.c')
-rw-r--r--src/lib/libcrypto/des/ecb_enc.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/src/lib/libcrypto/des/ecb_enc.c b/src/lib/libcrypto/des/ecb_enc.c
index 75ae6cf8bb..0684e769b3 100644
--- a/src/lib/libcrypto/des/ecb_enc.c
+++ b/src/lib/libcrypto/des/ecb_enc.c
@@ -57,7 +57,53 @@
57 */ 57 */
58 58
59#include "des_locl.h" 59#include "des_locl.h"
60#include "spr.h" 60#include "des_ver.h"
61#include <openssl/opensslv.h>
62#include <openssl/bio.h>
63
64OPENSSL_GLOBAL const char libdes_version[]="libdes" OPENSSL_VERSION_PTEXT;
65OPENSSL_GLOBAL const char DES_version[]="DES" OPENSSL_VERSION_PTEXT;
66
67const char *DES_options(void)
68 {
69 static int init=1;
70 static char buf[32];
71
72 if (init)
73 {
74 const char *ptr,*unroll,*risc,*size;
75
76#ifdef DES_PTR
77 ptr="ptr";
78#else
79 ptr="idx";
80#endif
81#if defined(DES_RISC1) || defined(DES_RISC2)
82#ifdef DES_RISC1
83 risc="risc1";
84#endif
85#ifdef DES_RISC2
86 risc="risc2";
87#endif
88#else
89 risc="cisc";
90#endif
91#ifdef DES_UNROLL
92 unroll="16";
93#else
94 unroll="2";
95#endif
96 if (sizeof(DES_LONG) != sizeof(long))
97 size="int";
98 else
99 size="long";
100 BIO_snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
101 size);
102 init=0;
103 }
104 return(buf);
105 }
106
61 107
62void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, 108void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
63 DES_key_schedule *ks, int enc) 109 DES_key_schedule *ks, int enc)