checksums.sodium: add a couple of tests and the "not tested" tag
The result for the first test (with no key) was produced using the b2sum utility (part of Git for Windows) with the "-a blake2b" option, because that's the hash that is currently being used by libsodium for its Generic Hashing API. The "not tested" tag was added to avoid adding the libsodium dependency to the automated build evnironment.factor-shell
parent
70eb4f1d34
commit
383dc58d7e
|
@ -0,0 +1,21 @@
|
|||
! Copyright (C) 2018 Alexander Ilin.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: tools.test checksums.sodium ;
|
||||
IN: checksums.sodium.tests
|
||||
|
||||
CONSTANT: test-lines { "Hello," "world!" }
|
||||
CONSTANT: key B{ 1 2 3 4 5 }
|
||||
|
||||
{ B{
|
||||
139 36 186 84 68 114 23 158 49 88 99 135 7 27 173 126 1 166
|
||||
211 245 212 87 23 116 86 191 32 15 106 139 134 168 184 156
|
||||
246 65 84 90 77 78 127 26 18 229 103 211 131 111 224 131 48
|
||||
77 157 208 10 231 152 223 132 200 228 141 25 64
|
||||
} } [ test-lines 64 f <sodium-checksum> checksum-lines ] unit-test
|
||||
|
||||
{ B{
|
||||
51 107 65 253 93 78 146 11 36 184 39 107 133 237 22 60 249
|
||||
171 78 26 189 168 126 117 78 134 62 73 166 1 208 132 76 197
|
||||
54 33 174 82 148 192 158 211 190 77 104 154 39 187 128 118
|
||||
216 161 100 21 241 244 199 135 79 62 233 12 137 185
|
||||
} } [ test-lines 64 key <sodium-checksum> checksum-lines ] unit-test
|
|
@ -0,0 +1 @@
|
|||
not tested
|
Loading…
Reference in New Issue