Changeset 15620 in project


Ignore:
Timestamp:
08/29/09 05:02:31 (10 years ago)
Author:
Kon Lovett
Message:

Has been using wrong procs & constants in some routines.

Location:
release/4/sha2/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/sha2/trunk/sha2.scm

    r15618 r15620  
    3232#undef SHA2_USE_MEMSET_MEMCPY
    3333#undef SHA2_USE_INTTYPES_H
    34 #endif
    3534<#
    3635
     
    5958(define (sha256-primitive)
    6059  (make-message-digest-primitive
    61     context-size-384 digest-length-384
    62     sha384-init sha384-update sha384-final
     60    context-size-256 digest-length-256
     61    sha256-init sha256-update sha256-final
    6362    'sha256-primitive))
    6463
     
    8786(define (sha384-primitive)
    8887  (make-message-digest-primitive
    89     context-size-256 digest-length-256
    90     sha256-init sha256-update sha256-final
     88    context-size-384 digest-length-384
     89    sha384-init sha384-update sha384-final
    9190    'sha384-primitive))
    9291
  • release/4/sha2/trunk/tests/run.scm

    r15618 r15620  
    77
    88  (test-group "Strings 256"
    9       (test "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" (sha256:digest "abc"))
    10       (test "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1" (sha256:digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
     9      (test "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad" (sha256-digest "abc"))
     10      (test "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1" (sha256-digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
    1111  )
    1212
    1313  (test-group "Strings 384"
    14       (test "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7" (sha384:digest "abc"))
    15       (test "3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b" (sha384:digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
     14      (test "cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7" (sha384-digest "abc"))
     15      (test "3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b" (sha384-digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
    1616  )
    1717
    1818  (test-group "Strings 512"
    19       (test "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f" (sha512:digest "abc"))
    20       (test "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445" (sha512:digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
     19      (test "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f" (sha512-digest "abc"))
     20      (test "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445" (sha512-digest "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"))
    2121  )
    2222)
Note: See TracChangeset for help on using the changeset viewer.