]> gitweb.factorcode.org Git - factor.git/blob - extra/checksums/sodium/sodium-tests.factor
Switch to https urls
[factor.git] / extra / checksums / sodium / sodium-tests.factor
1 ! Copyright (C) 2018 Alexander Ilin.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: tools.test checksums checksums.sodium ;
4 IN: checksums.sodium.tests
5
6 CONSTANT: test-lines { "Hello," "world!" }
7 CONSTANT: key B{ 1 2 3 4 5 }
8
9 { B{
10     139 36 186 84 68 114 23 158 49 88 99 135 7 27 173 126 1 166
11     211 245 212 87 23 116 86 191 32 15 106 139 134 168 184 156
12     246 65 84 90 77 78 127 26 18 229 103 211 131 111 224 131 48
13     77 157 208 10 231 152 223 132 200 228 141 25 64
14 } } [ test-lines 64 f <sodium-checksum> checksum-lines ] unit-test
15
16 { B{
17     51 107 65 253 93 78 146 11 36 184 39 107 133 237 22 60 249
18     171 78 26 189 168 126 117 78 134 62 73 166 1 208 132 76 197
19     54 33 174 82 148 192 158 211 190 77 104 154 39 187 128 118
20     216 161 100 21 241 244 199 135 79 62 233 12 137 185
21 } } [ test-lines 64 key <sodium-checksum> checksum-lines ] unit-test