Artifact 367620f5c2b23145ed8001a600dbe61e91bfe112:
- File tests/keys.fs — part of check-in [d9b7c049cf] at 2016-01-22 23:49:12 on branch trunk — Added rest of the tests (user: bernd size: 1042)
0000: 5c 20 6e 65 74 32 6f 20 6b 65 79 20 73 74 6f 72 \ net2o key stor 0010: 61 67 65 20 74 65 73 74 73 0a 0a 5c 20 43 6f 70 age tests..\ Cop 0020: 79 72 69 67 68 74 20 28 43 29 20 32 30 31 34 20 yright (C) 2014 0030: 20 20 42 65 72 6e 64 20 50 61 79 73 61 6e 0a 0a Bernd Paysan.. 0040: 5c 20 54 68 69 73 20 70 72 6f 67 72 61 6d 20 69 \ This program i 0050: 73 20 66 72 65 65 20 73 6f 66 74 77 61 72 65 3a s free software: 0060: 20 79 6f 75 20 63 61 6e 20 72 65 64 69 73 74 72 you can redistr 0070: 69 62 75 74 65 20 69 74 20 61 6e 64 2f 6f 72 20 ibute it and/or 0080: 6d 6f 64 69 66 79 0a 5c 20 69 74 20 75 6e 64 65 modify.\ it unde 0090: 72 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 r the terms of t 00a0: 68 65 20 47 4e 55 20 41 66 66 65 72 6f 20 47 65 he GNU Affero Ge 00b0: 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 neral Public Lic 00c0: 65 6e 73 65 20 61 73 20 70 75 62 6c 69 73 68 65 ense as publishe 00d0: 64 20 62 79 0a 5c 20 74 68 65 20 46 72 65 65 20 d by.\ the Free 00e0: 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 61 74 Software Foundat 00f0: 69 6f 6e 2c 20 65 69 74 68 65 72 20 76 65 72 73 ion, either vers 0100: 69 6f 6e 20 33 20 6f 66 20 74 68 65 20 4c 69 63 ion 3 of the Lic 0110: 65 6e 73 65 2c 20 6f 72 0a 5c 20 28 61 74 20 79 ense, or.\ (at y 0120: 6f 75 72 20 6f 70 74 69 6f 6e 29 20 61 6e 79 20 our option) any 0130: 6c 61 74 65 72 20 76 65 72 73 69 6f 6e 2e 0a 0a later version... 0140: 5c 20 54 68 69 73 20 70 72 6f 67 72 61 6d 20 69 \ This program i 0150: 73 20 64 69 73 74 72 69 62 75 74 65 64 20 69 6e s distributed in 0160: 20 74 68 65 20 68 6f 70 65 20 74 68 61 74 20 69 the hope that i 0170: 74 20 77 69 6c 6c 20 62 65 20 75 73 65 66 75 6c t will be useful 0180: 2c 0a 5c 20 62 75 74 20 57 49 54 48 4f 55 54 20 ,.\ but WITHOUT 0190: 41 4e 59 20 57 41 52 52 41 4e 54 59 3b 20 77 69 ANY WARRANTY; wi 01a0: 74 68 6f 75 74 20 65 76 65 6e 20 74 68 65 20 69 thout even the i 01b0: 6d 70 6c 69 65 64 20 77 61 72 72 61 6e 74 79 20 mplied warranty 01c0: 6f 66 0a 5c 20 4d 45 52 43 48 41 4e 54 41 42 49 of.\ MERCHANTABI 01d0: 4c 49 54 59 20 6f 72 20 46 49 54 4e 45 53 53 20 LITY or FITNESS 01e0: 46 4f 52 20 41 20 50 41 52 54 49 43 55 4c 41 52 FOR A PARTICULAR 01f0: 20 50 55 52 50 4f 53 45 2e 20 20 53 65 65 20 74 PURPOSE. See t 0200: 68 65 0a 5c 20 47 4e 55 20 41 66 66 65 72 6f 20 he.\ GNU Affero 0210: 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c General Public L 0220: 69 63 65 6e 73 65 20 66 6f 72 20 6d 6f 72 65 20 icense for more 0230: 64 65 74 61 69 6c 73 2e 0a 0a 5c 20 59 6f 75 20 details...\ You 0240: 73 68 6f 75 6c 64 20 68 61 76 65 20 72 65 63 65 should have rece 0250: 69 76 65 64 20 61 20 63 6f 70 79 20 6f 66 20 74 ived a copy of t 0260: 68 65 20 47 4e 55 20 41 66 66 65 72 6f 20 47 65 he GNU Affero Ge 0270: 6e 65 72 61 6c 20 50 75 62 6c 69 63 20 4c 69 63 neral Public Lic 0280: 65 6e 73 65 0a 5c 20 61 6c 6f 6e 67 20 77 69 74 ense.\ along wit 0290: 68 20 74 68 69 73 20 70 72 6f 67 72 61 6d 2e 20 h this program. 02a0: 20 49 66 20 6e 6f 74 2c 20 73 65 65 20 3c 68 74 If not, see <ht 02b0: 74 70 3a 2f 2f 77 77 77 2e 67 6e 75 2e 6f 72 67 tp://www.gnu.org 02c0: 2f 6c 69 63 65 6e 73 65 73 2f 3e 2e 0a 0a 72 65 /licenses/>...re 02d0: 71 75 69 72 65 20 2e 2e 2f 6e 65 74 32 6f 2e 66 quire ../net2o.f 02e0: 73 0a 0a 2b 64 65 62 75 67 0a 0a 22 74 65 73 74 s..+debug.."test 02f0: 6b 65 79 2e 6e 32 6f 22 20 72 2f 77 20 63 72 65 key.n2o" r/w cre 0300: 61 74 65 2d 66 69 6c 65 20 74 68 72 6f 77 20 74 ate-file throw t 0310: 6f 20 6b 65 79 2d 73 66 64 0a 0a 22 54 68 69 73 o key-sfd.."This 0320: 20 69 73 20 61 20 54 65 73 74 22 20 22 3e 70 61 is a Test" ">pa 0330: 73 73 70 68 72 61 73 65 20 6b 65 79 3e 64 65 66 ssphrase key>def 0340: 61 75 6c 74 0a 22 74 65 73 74 22 20 32 64 75 70 ault."test" 2dup 0350: 20 6b 65 79 23 61 6e 6f 6e 20 2b 67 65 6e 2d 6b key#anon +gen-k 0360: 65 79 73 20 2e 72 73 6b 0a 22 61 6e 6f 6e 79 6d eys .rsk."anonym 0370: 6f 75 73 22 20 32 64 75 70 20 6b 65 79 23 61 6e ous" 2dup key#an 0380: 6f 6e 20 2b 67 65 6e 2d 6b 65 79 73 20 2e 72 73 on +gen-keys .rs 0390: 6b 0a 22 61 6c 69 63 65 22 20 32 64 75 70 20 6b k."alice" 2dup k 03a0: 65 79 23 75 73 65 72 20 2b 67 65 6e 2d 6b 65 79 ey#user +gen-key 03b0: 73 20 2e 72 73 6b 0a 22 62 6f 62 22 20 32 64 75 s .rsk."bob" 2du 03c0: 70 20 6b 65 79 23 75 73 65 72 20 2b 67 65 6e 2d p key#user +gen- 03d0: 6b 65 79 73 20 2e 72 73 6b 0a 22 65 76 65 22 20 keys .rsk."eve" 03e0: 32 64 75 70 20 6b 65 79 23 75 73 65 72 20 2b 67 2dup key#user +g 03f0: 65 6e 2d 6b 65 79 73 20 2e 72 73 6b 0a 0a 72 65 en-keys .rsk..re 0400: 61 64 2d 6b 65 79 73 0a 2e 6b 65 79 73 0a 0a 62 ad-keys..keys..b 0410: 79 65 ye