From 704113aa62d24e760089bb4aa86c0d7d0a990c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Mon, 20 Jul 1998 01:08:06 +0200 Subject: [PATCH] It's not certain that "\x2b" works with all C-compilers. Rev: src/modules/_Crypto/sha.c:1.13 --- src/modules/_Crypto/sha.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/modules/_Crypto/sha.c b/src/modules/_Crypto/sha.c index dfde58539c..5973617988 100644 --- a/src/modules/_Crypto/sha.c +++ b/src/modules/_Crypto/sha.c @@ -1,4 +1,4 @@ -/* $Id: sha.c,v 1.12 1998/07/19 21:58:24 nisse Exp $ +/* $Id: sha.c,v 1.13 1998/07/19 23:08:06 grubba Exp $ * * Written by Niels M�ller */ @@ -16,7 +16,7 @@ #include "module_support.h" #include "las.h" -RCSID("$Id: sha.c,v 1.12 1998/07/19 21:58:24 nisse Exp $"); +RCSID("$Id: sha.c,v 1.13 1998/07/19 23:08:06 grubba Exp $"); #include <sha.h> @@ -59,17 +59,22 @@ static void f_update(INT32 args) push_object(this_object()); } + /* + * SHA1 OBJECT IDENTIFIER ::= { + * iso(1) identified-organization(3) oiw(14) secsig(3) + * algorithm(2) 26 + * } + * + * 0x2b0e 0302 1a + */ +static char sha_id[] = { + 0x2b, 0x0e, 0x03, 0x02, 0x1a, +}; + static void f_identifier(INT32 args) { - /* - SHA1 OBJECT IDENTIFIER ::= { - iso(1) identified-organization(3) oiw(14) secsig(3) - algorithm(2) 26 - } - */ pop_n_elems(args); - push_string(make_shared_binary_string( - "\x2b\x0e\x03\x02\x1a", 5)); + push_string(make_shared_binary_string(sha_id, 5)); } static void f_digest(INT32 args) -- GitLab