Changeset 37643 in project


Ignore:
Timestamp:
06/02/19 19:23:07 (7 weeks ago)
Author:
kon
Message:

use size_t for len (note out of step w/ -prim doc 4 now)

Location:
release/5/sha1/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • release/5/sha1/trunk/sha1-api.scm

    r36632 r37643  
    2424;;
    2525
    26 (define-foreign-variable *digest-length* unsigned-int "SHA1_DIGEST_LENGTH")
    27 (define-foreign-variable *block-length* unsigned-int "SHA1_BLOCK_LENGTH")
    28 (define-foreign-variable *context-size* unsigned-int "sizeof(SHA1_CTX)")
     26(define-foreign-variable *digest-length* size_t "SHA1_DIGEST_LENGTH")
     27(define-foreign-variable *block-length* size_t "SHA1_BLOCK_LENGTH")
     28(define-foreign-variable *context-size* size_t "sizeof(SHA1_CTX)")
    2929
    3030(define context-size *context-size*)
     
    3535
    3636(define init (foreign-lambda void SHA1Init c-pointer))
    37 (define update (foreign-lambda void SHA1Update c-pointer scheme-pointer unsigned-int))
     37(define update (foreign-lambda void SHA1Update c-pointer scheme-pointer size_t))
    3838(define final (foreign-lambda void SHA1Final c-pointer scheme-pointer))
    39 (define raw-update (foreign-lambda void SHA1Update c-pointer c-pointer unsigned-int))
     39(define raw-update (foreign-lambda void SHA1Update c-pointer c-pointer size_t))
    4040
    4141) ;sha1-api
  • release/5/sha1/trunk/sha1-base.c

    r37641 r37643  
    128128 */
    129129static void
    130 SHA1Update(SHA1_CTX *context, const uint8_t *data, uint32_t len)
     130SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len)
    131131{
    132132    uint32_t i;
  • release/5/sha1/trunk/sha1.egg

    r37640 r37643  
    44
    55((synopsis "Computes SHA1 (FIPS-180-1) checksums")
    6  (version "4.1.2")
     6 (version "4.1.3")
    77 (category crypt)
    88 (author "Steve Reid, packaged for Chicken by Peter Bex")
  • release/5/sha1/trunk/sha1.h

    r37641 r37643  
    1616static void     SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH]);
    1717static void     SHA1Init(SHA1_CTX *context);
    18 static void     SHA1Update(SHA1_CTX *context, const uint8_t *data, uint32_t len);
     18static void     SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len);
    1919static void     SHA1Final(SHA1_CTX *context, uint8_t digest[SHA1_DIGEST_LENGTH]);
Note: See TracChangeset for help on using the changeset viewer.