mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
core/crypto/ripemd: Remove, historical/exotic
This commit is contained in:
-22
@@ -24,7 +24,6 @@ import "vendor:botan/sha3"
|
||||
import "vendor:botan/keccak"
|
||||
import "vendor:botan/shake"
|
||||
import "vendor:botan/whirlpool"
|
||||
import "vendor:botan/ripemd"
|
||||
import "vendor:botan/blake2b"
|
||||
import "vendor:botan/tiger"
|
||||
import "vendor:botan/streebog"
|
||||
@@ -74,7 +73,6 @@ main :: proc() {
|
||||
test_streebog_256(&t)
|
||||
test_streebog_512(&t)
|
||||
test_blake2b(&t)
|
||||
test_ripemd_160(&t)
|
||||
// test_tiger_128(&t)
|
||||
// test_tiger_160(&t)
|
||||
// test_tiger_192(&t)
|
||||
@@ -419,26 +417,6 @@ test_blake2b :: proc(t: ^testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
@(test)
|
||||
test_ripemd_160 :: proc(t: ^testing.T) {
|
||||
// Test vectors from
|
||||
// https://homes.esat.kuleuven.be/~bosselae/ripemd160.html
|
||||
test_vectors := [?]TestHash {
|
||||
TestHash{"9c1185a5c5e9fc54612808977ee8f548b2258d31", ""},
|
||||
TestHash{"0bdc9d2d256b3ee9daae347be6f4dc835a467ffe", "a"},
|
||||
TestHash{"8eb208f7e05d987a9b044a8e98c6b087f15a0bfc", "abc"},
|
||||
TestHash{"5d0689ef49d2fae572b881b123a85ffa21595f36", "message digest"},
|
||||
TestHash{"f71c27109c692c1b56bbdceb5b9d2865b3708dbc", "abcdefghijklmnopqrstuvwxyz"},
|
||||
TestHash{"12a053384a9c0c88e405a06c27dcf49ada62eb2b", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"},
|
||||
TestHash{"b0e20b6e3116640286ed3a87a5713079b21f5189", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"},
|
||||
}
|
||||
for v, _ in test_vectors {
|
||||
computed := ripemd.hash_160(v.str)
|
||||
computed_str := hex_string(computed[:])
|
||||
expect(t, computed_str == v.hash, fmt.tprintf("Expected: %s for input of %s, but got %s instead", v.hash, v.str, computed_str))
|
||||
}
|
||||
}
|
||||
|
||||
@(test)
|
||||
test_tiger_128 :: proc(t: ^testing.T) {
|
||||
test_vectors := [?]TestHash {
|
||||
|
||||
Reference in New Issue
Block a user