Changeset 35338 in project


Ignore:
Timestamp:
03/25/18 04:49:47 (8 months ago)
Author:
kon
Message:

use typed-define, add types

Location:
release/4/message-digest/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • release/4/message-digest/trunk/message-digest-basic.scm

    r34373 r35338  
    77(module message-digest-basic ()
    88
    9 (import scheme)
    10 
    11 (import chicken)
     9(import scheme chicken)
    1210
    1311(reexport
  • release/4/message-digest/trunk/message-digest-int.scm

    r35044 r35338  
    3434  message-digest-type
    3535  message-digest-support
    36   blob-set-int)
     36  blob-set-int
     37  typed-define)
    3738
    3839;;; Support
     40
    3941;;
    4042
    41 (define (get-byte-order loc obj)
     43(define-type message-digest (struct message-digest))
     44
     45;;
     46
     47(define: (get-byte-order (loc symbol) (obj *)) --> symbol
    4248  (case obj
    4349        ((big-endian be big msb)                                'big-endian )
     
    4854;;
    4955
    50 (define (*message-digest-update-uint loc md n size setter)
    51   (let ((blb (setup-message-digest-buffer! (check-message-digest loc md) size)))
     56(define: (*message-digest-update-uint (loc symbol) (md message-digest) (n number) (size fixnum) (setter procedure)) -> void
     57  (let (
     58    (blb (setup-message-digest-buffer! (check-message-digest loc md) size)) )
    5259        (setter blb (check-integer loc n) 0)
    5360        (*message-digest-update-blob md blb size) ) )
     
    5764;; Char
    5865
    59 (define (message-digest-update-char-u8 md ch)
    60         (*message-digest-update-uint
    61           'message-digest-update-char-u8
     66(define: (message-digest-update-char-u8 (md message-digest) (ch char)) -> void
     67        (*message-digest-update-uint 'message-digest-update-char-u8
    6268          md
    6369          (char->integer (check-char 'message-digest-update-char-u8 ch))
     
    6571          *blob-set-u8!) )
    6672
    67 (define (message-digest-update-char-be md ch)
    68         (*message-digest-update-uint
    69           'message-digest-update-char-be
     73(define: (message-digest-update-char-be (md message-digest) (ch char)) -> void
     74        (*message-digest-update-uint 'message-digest-update-char-be
    7075          md
    7176          (char->integer (check-char 'message-digest-update-char ch))
     
    7378          *blob-set-u32-be!) )
    7479
    75 (define (message-digest-update-char-le md ch)
    76         (*message-digest-update-uint
    77           'message-digest-update-char-le
     80(define: (message-digest-update-char-le (md message-digest) (ch char)) -> void
     81        (*message-digest-update-uint 'message-digest-update-char-le
    7882          md
    7983          (char->integer (check-char 'message-digest-update-char ch))
     
    8387;; Unsigned Integer 8, 16, 32, & 64 bits
    8488
    85 (define (message-digest-update-u8 md n)
     89(define: (message-digest-update-u8 (md message-digest) (n number)) -> void
    8690        (*message-digest-update-uint 'message-digest-update-u8 md n 1 *blob-set-u8!) )
    8791
    88 (define (message-digest-update-u16-be md n)
     92(define: (message-digest-update-u16-be (md message-digest) (n number)) -> void
    8993        (*message-digest-update-uint 'message-digest-update-u16-be md n 2 *blob-set-u16-be!) )
    9094
    91 (define (message-digest-update-u16-le md n)
     95(define: (message-digest-update-u16-le (md message-digest) (n number)) -> void
    9296        (*message-digest-update-uint 'message-digest-update-u16-le md n 2 *blob-set-u16-le!) )
    9397
    94 (define (message-digest-update-u32-be md n)
     98(define: (message-digest-update-u32-be (md message-digest) (n number)) -> void
    9599        (*message-digest-update-uint 'message-digest-update-u32-be md n 4 *blob-set-u32-be!) )
    96100
    97 (define (message-digest-update-u32-le md n)
     101(define: (message-digest-update-u32-le (md message-digest) (n number)) -> void
    98102        (*message-digest-update-uint 'message-digest-update-u32-le md n 4 *blob-set-u32-le!) )
    99103
    100 (define (message-digest-update-u64-be md n)
     104(define: (message-digest-update-u64-be (md message-digest) (n number)) -> void
    101105        (*message-digest-update-uint 'message-digest-update-u64-be md n 8 *blob-set-u64-be!) )
    102106
    103 (define (message-digest-update-u64-le md n)
     107(define: (message-digest-update-u64-le (md message-digest) (n number)) -> void
    104108        (*message-digest-update-uint 'message-digest-update-u64-le md n 8 *blob-set-u64-le!) )
    105109
    106110;; Machine Byte Order w/ Char & Unsigned Integer
    107111
    108 (define (message-digest-update-char md ch #!optional (order (machine-byte-order)))
    109         (case (get-byte-order 'message-digest-update-char order)
    110                 ((little-endian)        (message-digest-update-char-le md ch) )
    111                 ((big-endian)                   (message-digest-update-char-be md ch) ) ) )
     112(define: (message-digest-update-char (md message-digest) (ch char) . (opts (list-of symbol))) -> void
     113  (let (
     114    (order (optional opts (machine-byte-order))) )
     115    (case (get-byte-order 'message-digest-update-char order)
     116      ((little-endian)  (message-digest-update-char-le md ch) )
     117      ((big-endian)                     (message-digest-update-char-be md ch) ) ) ) )
    112118
    113 (define (message-digest-update-u16 md n #!optional (order (machine-byte-order)))
    114         (case (get-byte-order 'message-digest-update-u16 order)
    115                 ((little-endian)        (message-digest-update-u16-le md n) )
    116                 ((big-endian)                   (message-digest-update-u16-be md n) ) ) )
     119(define: (message-digest-update-u16 (md message-digest) (n number) . (opts (list-of symbol))) -> void
     120  (let (
     121    (order (optional opts (machine-byte-order))) )
     122    (case (get-byte-order 'message-digest-update-u16 order)
     123      ((little-endian)  (message-digest-update-u16-le md n) )
     124      ((big-endian)                     (message-digest-update-u16-be md n) ) ) ) )
    117125
    118 (define (message-digest-update-u32 md n #!optional (order (machine-byte-order)))
    119         (case (get-byte-order 'message-digest-update-u32 order)
    120                 ((little-endian)        (message-digest-update-u32-le md n) )
    121                 ((big-endian)                   (message-digest-update-u32-be md n) ) ) )
     126(define: (message-digest-update-u32 (md message-digest) (n number) . (opts (list-of symbol))) -> void
     127  (let (
     128    (order (optional opts (machine-byte-order))) )
     129    (case (get-byte-order 'message-digest-update-u32 order)
     130      ((little-endian)  (message-digest-update-u32-le md n) )
     131      ((big-endian)                     (message-digest-update-u32-be md n) ) ) ) )
    122132
    123 (define (message-digest-update-u64 md n #!optional (order (machine-byte-order)))
    124         (case (get-byte-order 'message-digest-update-u64 order)
    125                 ((little-endian)        (message-digest-update-u64-le md n) )
    126                 ((big-endian)                   (message-digest-update-u64-be md n) ) ) )
     133(define: (message-digest-update-u64 (md message-digest) (n number) . (opts (list-of symbol))) -> void
     134  (let (
     135    (order (optional opts (machine-byte-order))) )
     136    (case (get-byte-order 'message-digest-update-u64 order)
     137      ((little-endian)  (message-digest-update-u64-le md n) )
     138      ((big-endian)                     (message-digest-update-u64-be md n) ) ) ) )
    127139
    128140) ;module message-digest-int
  • release/4/message-digest/trunk/message-digest-item.scm

    r35044 r35338  
    2020
    2121(import scheme chicken)
    22 
    2322(use
    2423  message-digest-type
    25   message-digest-update-item)
     24  message-digest-update-item
     25  typed-define)
     26
     27;;;
     28
     29(define-type pathname string)
     30
     31(define-type message-digest-primitive (struct message-digest-primitive))
     32
     33(define-type message-digest-buffer (or string blob u8vector))
     34
     35(define-type message-digest-result-form (or string blob u8vector))
    2636
    2737;;; Single Source API
     
    2939;;
    3040
    31 (define (message-digest-object mdp obj #!optional (result-type (message-digest-result-form)) (start 0) (end #f))
    32   (let ((md (initialize-message-digest mdp)))
    33     (message-digest-update-object md obj start end)
    34     (finalize-message-digest md result-type) ) )
     41(define: (message-digest-object (mdp message-digest-primitive) (obj *) . (opts list)) -> message-digest-result-form
     42  (let-optionals* opts (
     43    (result-type (message-digest-result-form))
     44    (start 0)
     45    (end #f) )
     46    (let ((md (initialize-message-digest mdp)))
     47      (message-digest-update-object md obj start end)
     48      (finalize-message-digest md result-type) ) ) )
    3549
    36 (define (message-digest-file mdp flnm #!optional (result-type (message-digest-result-form)))
    37   (let ((md (initialize-message-digest mdp)))
     50(define: (message-digest-file (mdp message-digest-primitive) (flnm pathname) . (opts list)) -> message-digest-result-form
     51  (let* (
     52    (result-type (message-digest-result-form))
     53    (md (initialize-message-digest mdp)) )
    3854    (message-digest-update-file md flnm)
    3955    (finalize-message-digest md result-type) ) )
    4056
    41 (define (message-digest-port mdp port #!optional (result-type (message-digest-result-form)))
    42   (let ((md (initialize-message-digest mdp)))
     57(define: (message-digest-port (mdp message-digest-primitive) (port output-port) . (opts list)) -> message-digest-result-form
     58  (let* (
     59    (result-type (message-digest-result-form))
     60    (md (initialize-message-digest mdp)) )
    4361    (message-digest-update-port md port)
    4462    (finalize-message-digest md result-type) ) )
     
    4664;;
    4765
    48 (define (message-digest-object! mdp obj buffer #!optional (start 0) (end #f))
    49   (let ((md (initialize-message-digest mdp)))
    50     (message-digest-update-object md obj start end)
    51     (finalize-message-digest! md buffer) ) )
     66(define: (message-digest-object! (mdp message-digest-primitive) (obj *) (buf message-digest-buffer) . (opts list)) -> message-digest-result-form
     67  (let-optionals* opts (
     68    (start 0)
     69    (end #f) )
     70    (let (
     71      (md (initialize-message-digest mdp)) )
     72      (message-digest-update-object md obj start end)
     73      (finalize-message-digest! md buf) ) ) )
    5274
    53 (define (message-digest-file! mdp flnm buffer)
    54   (let ((md (initialize-message-digest mdp)))
     75(define: (message-digest-file! (mdp message-digest-primitive) (flnm pathname) (buf message-digest-buffer)) -> message-digest-result-form
     76  (let (
     77    (md (initialize-message-digest mdp)) )
    5578    (message-digest-update-file md flnm)
    56     (finalize-message-digest! md buffer) ) )
     79    (finalize-message-digest! md buf) ) )
    5780
    58 (define (message-digest-port! mdp port buffer)
     81(define: (message-digest-port! (mdp message-digest-primitive) (port output-port) (buf message-digest-buffer)) -> message-digest-result-form
    5982  (let ((md (initialize-message-digest mdp)))
    6083    (message-digest-update-port md port)
    61     (finalize-message-digest! md buffer) ) )
     84    (finalize-message-digest! md buf) ) )
    6285
    6386) ;module message-digest-item
  • release/4/message-digest/trunk/message-digest-primitive.scm

    r35044 r35338  
    2727
    2828(import scheme chicken)
    29 
    3029(use
    3130  (only type-checks
     
    3433    check-procedure)
    3534  (only type-errors
    36     error-argument-type))
     35    error-argument-type)
     36  typed-define)
    3737
    3838;;; Support
     39
     40(define-type message-digest-primitive (struct message-digest-primitive))
    3941
    4042;;
     
    5355;;
    5456
    55 (define (check-message-digest-arguments loc ctx-info digest-len init update final block-len name raw-update)
     57(define-inline (check-message-digest-arguments loc ctx-info digest-len init update final block-len name raw-update)
    5658  (unless (primitive-ctx-info? ctx-info)
    5759    (error-argument-type loc ctx-info "positive-fixnum or procedure" 'context-info) )
     
    6870;;
    6971
    70 (define-record-type message-digest-primitive
     72(define:-record-type message-digest-primitive
    7173  (*make-message-digest-primitive ctxi digest-len init update final block-len name raw-update)
    7274  message-digest-primitive?
    73   (ctxi message-digest-primitive-context-info)
    74   (digest-len message-digest-primitive-digest-length)
    75   (init message-digest-primitive-init)
    76   (update message-digest-primitive-update)
    77   (final message-digest-primitive-final)
    78   (block-len message-digest-primitive-block-length)
    79   (name message-digest-primitive-name)
    80   (raw-update message-digest-primitive-raw-update) )
     75  (ctxi (or fixnum procedure) message-digest-primitive-context-info)
     76  (digest-len fixnum message-digest-primitive-digest-length)
     77  (init procedure message-digest-primitive-init)
     78  (update procedure message-digest-primitive-update)
     79  (final procedure message-digest-primitive-final)
     80  (block-len fixnum message-digest-primitive-block-length)
     81  (name * message-digest-primitive-name)
     82  (raw-update procedure message-digest-primitive-raw-update) )
    8183
    8284(define-check+error-type message-digest-primitive)
    8385
    84 (define (make-message-digest-primitive ctx-info digest-len init update final . rest)
     86(define: (make-message-digest-primitive
     87            (ctx-info (or fixnum procedure)) (digest-len fixnum)
     88            (init procedure) (update procedure) (final procedure)
     89            . (opts (list-of *))) -> message-digest-primitive
    8590  ;
    8691  (define (pull-arg args pred defprc)
     
    8994      (values (defprc) args) ) )
    9095  ;
    91   (let*-values (((block-len rest) (pull-arg rest number? (lambda () 4)))
    92                 ((name rest) (pull-arg rest primitive-name? (lambda () (gensym 'message-digest-primitive))))
    93                 ((raw-update rest) (pull-arg rest procedure? (lambda () #f))) )
     96  (let*-values (
     97    ((block-len opts)
     98      (pull-arg opts number? (lambda () 4)))
     99    ((name opts)
     100      (pull-arg opts (lambda (x) (not (procedure? x))) (lambda () (gensym 'mdp))))
     101    ((raw-update opts)
     102      (pull-arg opts procedure? (lambda () #f))) )
    94103    (check-message-digest-arguments 'make-message-digest-primitive
    95104      ctx-info digest-len init update final block-len name raw-update)
  • release/4/message-digest/trunk/message-digest-support.scm

    r35044 r35338  
    5151  message-digest-primitive
    5252  message-digest-type
    53   fx-utils)
     53  fx-utils
     54  typed-define)
    5455
    5556;;; Support
     
    5758;;
    5859
     60(define-type srfi4vector (or u8vector s8vector u16vector s16vector u32vector s32vector f32vector f64vector))
     61
     62(define-type message-digest (struct message-digest))
     63
     64;;
     65
    5966;Used by update-item & srfi-4 modules
    60 (define (packed-vector->blob/shared obj)
     67
     68(define: (packed-vector->blob/shared (obj srfi4vector)) -> (or boolean blob)
    6169  (cond
    6270    ((u8vector? obj)        (u8vector->blob/shared obj))
     
    7482;;
    7583
    76 (define (u8vector/slice u8vec start end)
     84(define: (u8vector/slice (u8vec u8vector) (start fixnum) (end (or boolean fixnum))) -> u8vector
    7785   (let ((end (or end (u8vector-length u8vec))))
    7886    (if (and (fxzero? start) (fx= end (u8vector-length u8vec)))
     
    8088      (subu8vector u8vec start end) ) ) )
    8189
    82 (define (blob/slice blb start end)
    83   (let ((end (or end (blob-size blb))))
     90(define: (blob/slice (blb blob) (start fixnum) (end (or boolean fixnum))) -> blob
     91  (let (
     92    (end (or end (blob-size blb))) )
    8493    (if (and (fxzero? start) (fx= end (blob-size blb)))
    8594      blb
    8695      (string->blob (##sys#substring (blob->string blb) start end)) ) ) )
    8796
    88 (define (string/slice str start end)
    89   (let ((end (or end (string-length str))))
     97(define: (string/slice (str string) (start fixnum) (end (or boolean fixnum))) -> string
     98  (let (
     99    (end (or end (string-length str))) )
    90100    (if (and (fxzero? start) (fx= end (string-length str)))
    91101      str
     
    94104;;
    95105
    96 (define (*message-digest-update-blob md blb #!optional (siz (blob-size blb)))
    97   ((message-digest-algorithm-update md)
    98     (message-digest-context md)
    99     blb
    100     siz) )
     106(define: (*message-digest-update-blob (md message-digest) (blb blob) . (opts (list-of fixnum))) -> void
     107  (let (
     108    (siz (optional opts (blob-size blb))) )
     109    ((message-digest-algorithm-update md)
     110      (message-digest-context md)
     111      blb
     112      siz) ) )
    101113
    102 (define (*message-digest-update-string md str)
     114(define: (*message-digest-update-string (md message-digest) (str string)) -> void
    103115        (*message-digest-update-blob md (string->blob str)) )
    104116
    105 (define (message-digest-algorithm-update md)
     117(define: (message-digest-algorithm-update (md message-digest)) -> procedure
    106118  (message-digest-primitive-update (message-digest-algorithm md)) )
    107119
  • release/4/message-digest/trunk/message-digest-type.scm

    r35044 r35338  
    1414(;export
    1515  ; MD API
    16   message-digest-default-result-type  ;DEPRECATED
    1716  message-digest-result-form
    1817  message-digest? check-message-digest error-message-digest
     
    2019  initialize-message-digest
    2120  finalize-message-digest finalize-message-digest!
    22   setup-message-digest-buffer!)
     21  setup-message-digest-buffer!
     22  ;DEPRECATED
     23  message-digest-default-result-type)
    2324
    2425(import scheme chicken)
    25 
    2626(use
    2727  (only lolevel allocate free number-of-bytes)
     
    3434    error-argument-type)
    3535  miscmacros
    36   message-digest-primitive)
     36  message-digest-primitive
     37  typed-define)
    3738
    3839(declare
     
    9192
    9293(define (check-result-type loc mdp obj)
    93   (let ((siz
    94         (cond
    95           ((string? obj)
    96             (string-length obj))
    97           ((blob? obj)
    98             (blob-size obj))
    99           ((u8vector? obj)
    100             (u8vector-length obj))
    101           (else
    102             (error loc "unsupported result buffer" obj) ) ) )
    103         (rqr (message-digest-primitive-digest-length mdp)) )
     94  (let (
     95    (siz
     96      (cond
     97        ((string? obj)
     98          (string-length obj))
     99        ((blob? obj)
     100          (blob-size obj))
     101        ((u8vector? obj)
     102          (u8vector-length obj))
     103        (else
     104          (error loc "unsupported result buffer" obj) ) ) )
     105      (rqr (message-digest-primitive-digest-length mdp)) )
     106    ;
    104107    (unless (<= rqr siz)
    105108      (error loc "result buffer too small" rqr obj) ) )
     
    113116  (lambda (x)
    114117    (or
    115       (if x (canonical-result-name x) #;DEFAULT-RESULT-TYPE 'hex-string)
    116       (begin
    117         (warning 'message-digest-result-form "invalid result-form" x)
    118         (message-digest-result-form) ) ) ) )
    119 
    120 ;DEPRECATED
    121 (define message-digest-default-result-type message-digest-result-form)
    122 
    123 ;;
    124 
    125 (define-record-type message-digest
     118      (if x
     119        (canonical-result-name x)
     120        (begin
     121          (warning 'message-digest-result-form "invalid result-form" x)
     122          (message-digest-result-form) ) ) ) ) )
     123
     124;;
     125
     126(define-type srfi4vector (or u8vector s8vector u16vector s16vector u32vector s32vector f32vector f64vector))
     127
     128;(define-type message-digest-buffer (or string blob srfi4vector procedure input-port pointer))
     129(define-type message-digest-buffer (or string blob u8vector))
     130
     131(define-type message-digest-result-form (or string blob u8vector))
     132
     133(define-type message-digest-context (or fixnum procedure))
     134
     135(define-type message-digest-primitive (struct message-digest-primitive))
     136
     137(define:-record-type message-digest
    126138  (*make-message-digest mdp ctx buf)
    127139  message-digest?
    128   (mdp message-digest-algorithm)
    129   (ctx message-digest-context)
    130   (buf message-digest-buffer message-digest-buffer-set!) )
     140  (mdp message-digest-primitive message-digest-algorithm)
     141  (ctx message-digest-context message-digest-context)
     142  (buf (or boolean message-digest-buffer) message-digest-buffer message-digest-buffer-set!) )
    131143
    132144(define-check+error-type message-digest)
     
    134146;;
    135147
    136 (define (get-message-digest-primitive-context mdp)
    137   (let ((ctx-info (message-digest-primitive-context-info mdp)))
     148(define: (get-message-digest-primitive-context (mdp message-digest-primitive)) -> *
     149  (let (
     150    (ctx-info (message-digest-primitive-context-info mdp)) )
    138151    (if (procedure? ctx-info)
    139152      (ctx-info)
     
    142155;;
    143156
    144 (define (initialize-message-digest mdp)
    145   (let ((ctx
    146           (get-message-digest-primitive-context
    147             (check-message-digest-primitive 'initialize-message-digest mdp))))
     157(define: (initialize-message-digest (mdp message-digest-primitive)) -> message-digest
     158  (let (
     159    (ctx
     160      (get-message-digest-primitive-context
     161        (check-message-digest-primitive 'initialize-message-digest mdp))))
    148162    ((message-digest-primitive-init mdp) ctx)
    149163    (*make-message-digest mdp ctx #f) ) )
     
    151165;;
    152166
    153 (define (finalize-message-digest md #!optional (result-type (message-digest-result-form)))
    154   (let* ((mdp
    155           (message-digest-algorithm
    156             (check-message-digest 'finalize-message-digest md)))
    157          (res
    158           (make-blob (message-digest-primitive-digest-length mdp))) )
    159       ;side-effects res
    160       ((message-digest-primitive-final mdp) (message-digest-context md) res)
    161       (get-result-form 'finalize-message-digest res result-type) ) )
    162 
    163 (define (finalize-message-digest! md result-buffer)
    164   (let* ((mdp
    165           (message-digest-algorithm (check-message-digest 'finalize-message-digest md)))
    166          (res
    167           (check-result-type 'finalize-message-digest mdp result-buffer)) )
     167(define: (finalize-message-digest (md message-digest) . (opts (list-of message-digest-result-form))) -> message-digest-result-form
     168  (let* (
     169    (result-type
     170      (optional opts (message-digest-result-form)))
     171    (mdp
     172      (message-digest-algorithm (check-message-digest 'finalize-message-digest md)))
     173    (res
     174      (make-blob (message-digest-primitive-digest-length mdp))) )
     175    ;side-effects res
     176    ((message-digest-primitive-final mdp) (message-digest-context md) res)
     177    (get-result-form 'finalize-message-digest res result-type) ) )
     178
     179(define: (finalize-message-digest! (md message-digest) (result-buffer message-digest-buffer)) -> message-digest-result-form
     180  (let* (
     181    (mdp
     182      (message-digest-algorithm (check-message-digest 'finalize-message-digest md)))
     183    (res
     184      (check-result-type 'finalize-message-digest mdp result-buffer)) )
    168185    ;side-effects res
    169186    (let ((buf (if (u8vector? res) (##sys#slot res 1) res)))
     
    173190;;
    174191
    175 (define (setup-message-digest-buffer! md sz)
    176   (let ((buf (message-digest-buffer md))
    177         (sz (fxmax sz MINIMUM-BUFFER-SIZE)) )
     192(define: (setup-message-digest-buffer! (md message-digest) (sz fixnum)) -> message-digest-buffer
     193  (let (
     194    (buf (message-digest-buffer md))
     195    (sz (fxmax sz MINIMUM-BUFFER-SIZE)) )
    178196    ;enough space? then reuse, otherwise new buffer
     197    (if buf (print "buf " buf))
    179198    (if (and buf (fx<= sz (number-of-bytes buf)))
    180199      buf
    181200      (new-message-digest-buffer! md sz) ) ) )
    182201
    183 (define (new-message-digest-buffer! md sz)
    184   (let ((buf (make-blob sz)))
     202(define: (new-message-digest-buffer! (md message-digest) (sz fixnum)) -> message-digest-buffer
     203  (let (
     204    (buf (make-blob sz)) )
    185205    (message-digest-buffer-set! md buf)
    186206    buf ) )
    187207
     208;;DEPRECATED
     209
     210(: message-digest-default-result-type (deprecated message-digest-result-form))
     211(define message-digest-default-result-type message-digest-result-form)
     212
    188213) ;module message-digest-type
  • release/4/message-digest/trunk/message-digest.meta

    r34426 r35338  
    1313        (blob-utils "1.0.0")
    1414        (string-utils "1.2.1")
    15         (mathh "3.2.0"))
     15        (mathh "3.2.0")
     16        (dsssl-utils "2.2.0"))
    1617 (test-depends test)
    1718 (files
  • release/4/message-digest/trunk/message-digest.setup

    r35044 r35338  
    99  -no-procedure-checks-for-toplevel-bindings))
    1010
    11 (setup-shared+static-extension-module 'message-digest-primitive (extension-version "3.8.0")
     11(setup-shared+static-extension-module 'message-digest-primitive (extension-version "3.9.0")
    1212  #:inline? #t
    1313        #:types? #t
    1414  #:compile-options *md-csc-optn*)
    1515
    16 (setup-shared+static-extension-module 'message-digest-type (extension-version "3.8.0")
     16(setup-shared+static-extension-module 'message-digest-type (extension-version "3.9.0")
    1717  #:inline? #t
    1818        #:types? #t
    1919  #:compile-options *md-csc-optn*)
    2020
    21 (setup-shared+static-extension-module 'message-digest-chunk (extension-version "3.8.0")
     21(setup-shared+static-extension-module 'message-digest-chunk (extension-version "3.9.0")
    2222  #:inline? #t
    2323        #:types? #t
    2424  #:compile-options *md-csc-optn*)
    2525
    26 (setup-shared+static-extension-module 'message-digest-parameters (extension-version "3.8.0")
     26(setup-shared+static-extension-module 'message-digest-parameters (extension-version "3.9.0")
    2727  #:inline? #t
    2828        #:types? #t
    2929  #:compile-options *md-csc-optn*)
    3030
    31 (setup-shared+static-extension-module 'message-digest-support (extension-version "3.8.0")
     31(setup-shared+static-extension-module 'message-digest-support (extension-version "3.9.0")
    3232  #:inline? #t
    3333        #:types? #t
    3434  #:compile-options *md-csc-optn*)
    3535
    36 (setup-shared+static-extension-module 'message-digest-bv (extension-version "3.8.0")
     36(setup-shared+static-extension-module 'message-digest-bv (extension-version "3.9.0")
    3737  #:inline? #t
    3838        #:types? #t
    3939  #:compile-options *md-csc-optn*)
    4040
    41 (setup-shared+static-extension-module 'message-digest-int (extension-version "3.8.0")
     41(setup-shared+static-extension-module 'message-digest-int (extension-version "3.9.0")
    4242  #:inline? #t
    4343        #:types? #t
    4444  #:compile-options *md-csc-optn*)
    4545
    46 (setup-shared+static-extension-module 'message-digest-srfi-4 (extension-version "3.8.0")
     46(setup-shared+static-extension-module 'message-digest-srfi-4 (extension-version "3.9.0")
    4747  #:inline? #t
    4848        #:types? #t
    4949  #:compile-options *md-csc-optn*)
    5050
    51 (setup-shared+static-extension-module 'message-digest-update-item (extension-version "3.8.0")
     51(setup-shared+static-extension-module 'message-digest-update-item (extension-version "3.9.0")
    5252  #:inline? #t
    5353        #:types? #t
    5454  #:compile-options *md-csc-optn*)
    5555
    56 (setup-shared+static-extension-module 'message-digest-item (extension-version "3.8.0")
     56(setup-shared+static-extension-module 'message-digest-item (extension-version "3.9.0")
    5757  #:inline? #t
    5858        #:types? #t
    5959  #:compile-options *md-csc-optn*)
    6060
    61 (setup-shared+static-extension-module 'message-digest-port (extension-version "3.8.0")
     61(setup-shared+static-extension-module 'message-digest-port (extension-version "3.9.0")
    6262  #:inline? #t
    6363        #:types? #t
    6464  #:compile-options *md-csc-optn*)
    6565
    66 (setup-shared+static-extension-module 'message-digest-basic (extension-version "3.8.0")
     66(setup-shared+static-extension-module 'message-digest-basic (extension-version "3.9.0")
    6767  #:inline? #t
    6868        #:types? #t
    6969  #:compile-options *md-csc-optn*)
    7070
    71 (setup-shared+static-extension-module 'message-digest (extension-version "3.8.0")
     71(setup-shared+static-extension-module 'message-digest (extension-version "3.9.0")
    7272  #:inline? #t
    7373        #:types? #t
  • release/4/message-digest/trunk/tests/message-digest-test.scm

    r34562 r35338  
    2121(define simple-res (ashexstr simple-src))
    2222
    23 (define digest-length 5)
    24 (define context-size 10)
    25 (define block-length 64)
     23(define-constant digest-length 5)
     24(define-constant context-size 10)
     25(define-constant block-length 64)
    2626
    2727(define-constant BLOCK-LENGTH-DEFAULT 4)
Note: See TracChangeset for help on using the changeset viewer.