diff options
author | markus <> | 2002-09-05 12:51:52 +0000 |
---|---|---|
committer | markus <> | 2002-09-05 12:51:52 +0000 |
commit | 5514995a9d5ed91db089875adb509c7781357c0e (patch) | |
tree | 2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/sha/sha1s.cpp | |
parent | fd9566423b542798f5c8b06e68101a9ea5bb9885 (diff) | |
download | openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2 openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/sha/sha1s.cpp')
-rw-r--r-- | src/lib/libcrypto/sha/sha1s.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/sha/sha1s.cpp b/src/lib/libcrypto/sha/sha1s.cpp index 0163377de6..af23d1e0f2 100644 --- a/src/lib/libcrypto/sha/sha1s.cpp +++ b/src/lib/libcrypto/sha/sha1s.cpp | |||
@@ -32,8 +32,9 @@ void GetTSC(unsigned long& tsc) | |||
32 | 32 | ||
33 | #include <stdio.h> | 33 | #include <stdio.h> |
34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
35 | #include "sha.h" | 35 | #include <openssl/sha.h> |
36 | 36 | ||
37 | #define sha1_block_x86 sha1_block_asm_data_order | ||
37 | extern "C" { | 38 | extern "C" { |
38 | void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num); | 39 | void sha1_block_x86(SHA_CTX *ctx, unsigned char *buffer,int num); |
39 | } | 40 | } |
@@ -55,8 +56,10 @@ void main(int argc,char *argv[]) | |||
55 | if (num == 0) num=16; | 56 | if (num == 0) num=16; |
56 | if (num > 250) num=16; | 57 | if (num > 250) num=16; |
57 | numm=num+2; | 58 | numm=num+2; |
59 | #if 0 | ||
58 | num*=64; | 60 | num*=64; |
59 | numm*=64; | 61 | numm*=64; |
62 | #endif | ||
60 | 63 | ||
61 | for (j=0; j<6; j++) | 64 | for (j=0; j<6; j++) |
62 | { | 65 | { |
@@ -72,7 +75,7 @@ void main(int argc,char *argv[]) | |||
72 | sha1_block_x86(&ctx,buffer,num); | 75 | sha1_block_x86(&ctx,buffer,num); |
73 | } | 76 | } |
74 | 77 | ||
75 | printf("sha1 (%d bytes) %d %d (%.2f)\n",num, | 78 | printf("sha1 (%d bytes) %d %d (%.2f)\n",num*64, |
76 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); | 79 | e1-s1,e2-s2,(double)((e1-s1)-(e2-s2))/2); |
77 | } | 80 | } |
78 | } | 81 | } |