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/src/alphabet/crypt.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 / src / alphabet / crypt.rs` 40 lines ยท 1141 bytes Raw Blame History 1 //! `crypt(3)` Base64 encoding. 2 3 #![allow(deprecated)] 4 5 use super::{Alphabet, DecodeStep, EncodeStep}; 6 7 /// DEPRECATED: non-standard big endian variant of the `crypt(3)` Base64 encoding. 8 /// 9 /// ```text 10 /// [.-9] [A-Z] [a-z] 11 /// 0x2e-0x39, 0x41-0x5a, 0x61-0x7a 12 /// ``` 13 /// 14 ///
15 /// This encodes using a big endian variant of Base64. Most modern algorithms which can be 16 /// used via `crypt(3)` use the [`Base64ShaCrypt`][`crate::Base64ShaCrypt`] encoding. 17 ///
18 #[deprecated( 19 since = "1.8.2", 20 note = "non-standard encoding. Use Base64ShaCrypt for all crypt(3) algorithms" 21 )] 22 #[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] 23 pub struct Base64Crypt; 24 25 impl Alphabet for Base64Crypt { 26 const BASE: u8 = b'.'; 27 28 const DECODER: &'static [DecodeStep] = &[ 29 DecodeStep::Range(b'.'..=b'9', -45), 30 DecodeStep::Range(b'A'..=b'Z', -52), 31 DecodeStep::Range(b'a'..=b'z', -58), 32 ]; 33 34 const ENCODER: &'static [EncodeStep] = 35 &[EncodeStep::Apply(b'9', 7), EncodeStep::Apply(b'Z', 6)]; 36 37 const PADDED: bool = false; 38 39 type Unpadded = Self; 40 }