base64ct/alphabet/
crypt.rs1use super::{Alphabet, DecodeStep, EncodeStep};
4
5#[derive(Copy, Clone, Debug, Eq, PartialEq)]
12pub struct Base64Crypt;
13
14impl Alphabet for Base64Crypt {
15    const BASE: u8 = b'.';
16
17    const DECODER: &'static [DecodeStep] = &[
18        DecodeStep::Range(b'.'..b'9', -45),
19        DecodeStep::Range(b'A'..b'Z', -52),
20        DecodeStep::Range(b'a'..b'z', -58),
21    ];
22
23    const ENCODER: &'static [EncodeStep] =
24        &[EncodeStep::Apply(b'9', 7), EncodeStep::Apply(b'Z', 6)];
25
26    const PADDED: bool = false;
27
28    type Unpadded = Self;
29}