Displaying 3 results from an estimated 3 matches for "sha_digest_length".
Did you mean:
sha1_digest_length
2003 Mar 04
0
hashing known_hosts
...lt;openssl/evp.h>
#include <openssl/sha.h>
int
uuencode(u_char *src, u_int srclength,
char *target, size_t targsize)
{
return b64_ntop(src, srclength, target, targsize);
}
static char *pt(unsigned char *md)
{
int i;
static char buf[80];
for (i=0; i<SHA_DIGEST_LENGTH; i++)
sprintf(&(buf[i*2]),"%02x",md[i]);
return(buf);
}
int main(void) {
int a,b,c,d;
char ip[16];
unsigned char md[SHA_DIGEST_LENGTH];
char uu[SHA_DIGEST_LENGTH*2];
/* for (a=1; a<=233;a++) { */
for (a=1; a<=5;a++) {...
2000 Jul 02
2
``portability'' patch for OpenSSH S/Key support
...2000
@@ -4,7 +4,7 @@
#include "ssh.h"
#include "packet.h"
-#include <sha1.h>
+#include <openssl/sha.h>
/* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */
@@ -74,7 +74,6 @@
size_t secretlen = 0;
SHA_CTX ctx;
char *p, *u;
- char md[SHA_DIGEST_LENGTH];
/*
* Base first 4 chars of seed on hostname.
@@ -99,7 +98,7 @@
SHA1_Init(&ctx);
SHA1_Update(&ctx, username, strlen(username));
- SHA1_End(&ctx, up);
+ SHA1_Final(up, &ctx);
/* Collapse the hash */
ptr = hash_collapse(up);
@@ -133,7 +132,7 @@
SHA1_Init(&...
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...+#ifndef __LIB__SHA1__
+#define __LIB__SHA1__
+
+# define SHA_LONG unsigned int
+# define SHA_LBLOCK 16
+# define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a
+ * contiguous array of 32 bit wide
+ * big-endian values. */
+# define SHA_LAST_BLOCK (SHA_CBLOCK-8)
+# define SHA_DIGEST_LENGTH 20
+
+
+typedef struct SHAstate_st {
+ SHA_LONG h0, h1, h2, h3, h4;
+ SHA_LONG Nl, Nh;
+ SHA_LONG data[SHA_LBLOCK];
+ unsigned int num;
+} SHA_CTX;
+
+#endif
diff --git a/lib/sha_local.h b/lib/sha_local.h
new file mode 100644
index 0000000000000..58626ee3013b8
--- /dev/null
+++ b/lib/sha_local.h
@@...