Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/base64ct/tests/shacrypt.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / base64ct / tests / shacrypt.rs` 98 lines ยท 2281 bytes Raw Blame History 1 //! `crypt(3)` Base64 tests 2 3 #[macro_use] 4 mod common; 5 6 use crate::common::*; 7 use base64ct::Base64ShaCrypt; 8 9 const TEST_VECTORS: &[TestVector] = &[ 10 TestVector { raw: b"", b64: "" }, 11 TestVector { 12 raw: b"\x55", 13 b64: "J/", 14 }, 15 TestVector { 16 raw: b"\x55\xaa", 17 b64: "Jd8", 18 }, 19 TestVector { 20 raw: b"\x55\xaa\x55", 21 b64: "JdOJ", 22 }, 23 TestVector { 24 raw: b"\x55\xaa\x55\xaa", 25 b64: "JdOJe0", 26 }, 27 TestVector { 28 raw: b"\x55\xaa\x55\xaa\x55", 29 b64: "JdOJeK3", 30 }, 31 TestVector { 32 raw: b"\x55\xaa\x55\xaa\x55\xaa", 33 b64: "JdOJeKZe", 34 }, 35 TestVector { 36 raw: b"\x55\xaa\x55\xaf", 37 b64: "JdOJj0", 38 }, 39 TestVector { 40 raw: b"\x55\xaa\x55\xaa\x5f", 41 b64: "JdOJey3", 42 }, 43 TestVector { 44 raw: b"\0", 45 b64: "..", 46 }, 47 TestVector { 48 raw: b"***", 49 b64: "ecW8", 50 }, 51 TestVector { 52 raw: b"\x01\x02\x03\x04", 53 b64: "/6k.2.", 54 }, 55 TestVector { 56 raw: b"\xAD\xAD\xAD\xAD\xAD", 57 b64: "hqOfhq8", 58 }, 59 TestVector { 60 raw: b"\xFF\xEF\xFE\xFF\xEF\xFE", 61 b64: "zzizzziz", 62 }, 63 TestVector { 64 raw: b"\xFF\xFF\xFF\xFF\xFF", 65 b64: "zzzzzzD", 66 }, 67 TestVector { 68 raw: b"\x40\xC1\x3F\xBD\x05\x4C\x72\x2A\xA3\xC2\xF2\x11\x73\xC0\x69\xEA\ 69 \x49\x7D\x35\x29\x6B\xCC\x24\x65\xF6\xF9\xD0\x41\x08\x7B\xD7\xA9", 70 b64: ".3wDxK.Hmdmc09T2n/QOebITpYmOAHGNqbDo/VkSLb8", 71 }, 72 TestVector { 73 raw: b"@ \x0cDa\x1cH\xa2,L\xe3