Changeset 31021 in project


Ignore:
Timestamp:
06/14/14 22:12:50 (6 years ago)
Author:
Kon Lovett
Message:

add block-length to prim

Location:
release/4/ripemd
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/ripemd/tags/1.1.0/ripemd.meta

    r27657 r31021  
    99 (depends
    1010        (setup-helper "1.5.2")
    11         (message-digest "3.0.0"))
     11        (message-digest "3.1.0"))
    1212 (test-depends test)
    1313 (files "rmd160.h" "rmd128.h" "rmd160.c" "ripemd.setup" "rmd128.c" "ripemd.meta" "ripemd.scm" "ripemd.release-info" "tests/run.scm") )
  • release/4/ripemd/tags/1.1.0/ripemd.scm

    r26411 r31021  
    8787
    8888#include "rmd160.c"
     89#define RMD160blksiz 64
    8990#define RMD160hshsiz (160/8)
    9091#define RMD160ctxsiz (sizeof(ripemdctx) + sizeof(uint32_t)*(160/32))
     
    108109
    109110#include "rmd128.c"
     111#define RMD128blksiz 64
    110112#define RMD128hshsiz (128/8)
    111113#define RMD128ctxsiz (sizeof(ripemdctx) + sizeof(uint32_t)*(128/32))
     
    133135;;
    134136
    135 (define-foreign-variable context-size128 int "RMD128ctxsiz")
    136 (define-foreign-variable context-size160 int "RMD160ctxsiz")
     137(define-foreign-variable context-size128 unsigned-int "RMD128ctxsiz")
     138(define-foreign-variable digest-length128 unsigned-int "RMD128hshsiz")
     139(define-foreign-variable block-length128 unsigned-int "RMD128blksiz")
    137140
    138141(define init128
     
    145148    "ripemdX_final( &MDfinish128, result, ctx, RMD128hshsiz );"))
    146149
     150(define-foreign-variable context-size160 unsigned-int "RMD160ctxsiz")
     151(define-foreign-variable digest-length160 unsigned-int "RMD160hshsiz")
     152(define-foreign-variable block-length160 unsigned-int "RMD160blksiz")
     153
    147154(define init160
    148155  (foreign-lambda* void ((c-pointer ctx))
     
    154161  (foreign-lambda* void ((c-pointer ctx) (scheme-pointer result))
    155162    "ripemdX_final( &MDfinish160, result, ctx, RMD160hshsiz );"))
    156 
    157 (define-foreign-variable digest-length128 int "RMD128hshsiz")
    158 (define-foreign-variable digest-length160 int "RMD160hshsiz")
    159163
    160164;;
     
    169173                    context-size128 digest-length128
    170174                    init128 update128 final128
    171                     'ripemd128-primitive))
     175                    block-length128 'ripemd128-primitive))
    172176            the-prim ) ) ) ) )
    173177
     
    181185                    context-size160 digest-length160
    182186                    init160 update160 final160
    183                     'ripemd160-primitive))
     187                    block-length160 'ripemd160-primitive))
    184188            the-prim ) ) ) ) )
    185189
  • release/4/ripemd/tags/1.1.0/ripemd.setup

    r27657 r31021  
    55(verify-extension-name "ripemd")
    66
    7 (setup-shared-extension-module 'ripemd (extension-version "1.0.4")
     7(setup-shared-extension-module 'ripemd (extension-version "1.1.0")
    88  #:compile-options '(
    99    -fixnum-arithmetic
  • release/4/ripemd/trunk/ripemd.meta

    r27657 r31021  
    99 (depends
    1010        (setup-helper "1.5.2")
    11         (message-digest "3.0.0"))
     11        (message-digest "3.1.0"))
    1212 (test-depends test)
    1313 (files "rmd160.h" "rmd128.h" "rmd160.c" "ripemd.setup" "rmd128.c" "ripemd.meta" "ripemd.scm" "ripemd.release-info" "tests/run.scm") )
  • release/4/ripemd/trunk/ripemd.scm

    r26411 r31021  
    8787
    8888#include "rmd160.c"
     89#define RMD160blksiz 64
    8990#define RMD160hshsiz (160/8)
    9091#define RMD160ctxsiz (sizeof(ripemdctx) + sizeof(uint32_t)*(160/32))
     
    108109
    109110#include "rmd128.c"
     111#define RMD128blksiz 64
    110112#define RMD128hshsiz (128/8)
    111113#define RMD128ctxsiz (sizeof(ripemdctx) + sizeof(uint32_t)*(128/32))
     
    133135;;
    134136
    135 (define-foreign-variable context-size128 int "RMD128ctxsiz")
    136 (define-foreign-variable context-size160 int "RMD160ctxsiz")
     137(define-foreign-variable context-size128 unsigned-int "RMD128ctxsiz")
     138(define-foreign-variable digest-length128 unsigned-int "RMD128hshsiz")
     139(define-foreign-variable block-length128 unsigned-int "RMD128blksiz")
    137140
    138141(define init128
     
    145148    "ripemdX_final( &MDfinish128, result, ctx, RMD128hshsiz );"))
    146149
     150(define-foreign-variable context-size160 unsigned-int "RMD160ctxsiz")
     151(define-foreign-variable digest-length160 unsigned-int "RMD160hshsiz")
     152(define-foreign-variable block-length160 unsigned-int "RMD160blksiz")
     153
    147154(define init160
    148155  (foreign-lambda* void ((c-pointer ctx))
     
    154161  (foreign-lambda* void ((c-pointer ctx) (scheme-pointer result))
    155162    "ripemdX_final( &MDfinish160, result, ctx, RMD160hshsiz );"))
    156 
    157 (define-foreign-variable digest-length128 int "RMD128hshsiz")
    158 (define-foreign-variable digest-length160 int "RMD160hshsiz")
    159163
    160164;;
     
    169173                    context-size128 digest-length128
    170174                    init128 update128 final128
    171                     'ripemd128-primitive))
     175                    block-length128 'ripemd128-primitive))
    172176            the-prim ) ) ) ) )
    173177
     
    181185                    context-size160 digest-length160
    182186                    init160 update160 final160
    183                     'ripemd160-primitive))
     187                    block-length160 'ripemd160-primitive))
    184188            the-prim ) ) ) ) )
    185189
  • release/4/ripemd/trunk/ripemd.setup

    r27657 r31021  
    55(verify-extension-name "ripemd")
    66
    7 (setup-shared-extension-module 'ripemd (extension-version "1.0.4")
     7(setup-shared-extension-module 'ripemd (extension-version "1.1.0")
    88  #:compile-options '(
    99    -fixnum-arithmetic
Note: See TracChangeset for help on using the changeset viewer.