From 843d4d41c2dfc30331eccfd64da976bd4d0089a7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 10 Apr 2000 19:04:17 +0000 Subject: [PATCH] Repackage new crypto stuff. Use new GC finalizers to add GC protection to the context indices generated by the hash code. --- v7/src/runtime/crypto.scm | 4 ++-- v7/src/runtime/runtime.pkg | 35 +++++++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/crypto.scm b/v7/src/runtime/crypto.scm index ee16f625f..e2cce9803 100644 --- a/v7/src/runtime/crypto.scm +++ b/v7/src/runtime/crypto.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: crypto.scm,v 14.2 2000/04/10 19:01:28 cph Exp $ +$Id: crypto.scm,v 14.3 2000/04/10 19:04:17 cph Exp $ Copyright (c) 2000 Massachusetts Institute of Technology @@ -138,7 +138,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. passphrase)) (define (mhash-available?) - (implemented-primitive-procedure? mhash-update)) + (implemented-primitive-procedure? (ucode-primitive mhash 4))) (define (mhash-file hash-type filename) (call-with-binary-input-file filename diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index bbbd5603d..589953f06 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.341 2000/04/10 18:32:38 cph Exp $ +$Id: runtime.pkg,v 14.342 2000/04/10 19:01:31 cph Exp $ Copyright (c) 1988-2000 Massachusetts Institute of Technology @@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "bitstr" "boole" "boot" - "crypto" "equals" "fixart" "global" @@ -3524,6 +3523,38 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. eqht/put! make-eqht)) +(define-package (runtime crypto) + (files "crypto") + (parent ()) + (export () + md5-available? + md5-file + md5-string + md5-substring + md5-sum->hexadecimal + md5-sum->number + mhash-available? + mhash-end + mhash-file + mhash-get-block-size + mhash-hmac-end + mhash-hmac-init + mhash-init + mhash-keygen + mhash-keygen-max-key-size + mhash-keygen-salt-size + mhash-keygen-types + mhash-keygen-uses-count? + mhash-keygen-uses-hash-algorithm + mhash-keygen-uses-salt? + mhash-string + mhash-substring + mhash-sum->hexadecimal + mhash-sum->number + mhash-types + mhash-update) + (initialization (initialize-package!))) + (define-package (runtime regular-expression) (file-case options ((load) "regexp") -- 2.25.1