Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/SHA-1/Julia/sha-1.julia
Normal file
12
Task/SHA-1/Julia/sha-1.julia
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using Nettle
|
||||
|
||||
testdict = Dict("abc" => "a9993e364706816aba3e25717850c26c9cd0d89d",
|
||||
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" =>
|
||||
"84983e441c3bd26ebaae4aa1f95129e5e54670f1",
|
||||
"a" ^ 1_000_000 => "34aa973cd4c4daa4f61eeb2bdbad27316534016f",)
|
||||
|
||||
for (text, expect) in testdict
|
||||
digest = hexdigest("sha1", text)
|
||||
if length(text) > 50 text = text[1:50] * "..." end
|
||||
println("# $text\n -> digest: $digest\n -> expect: $expect")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue