1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use super::{Decode, Encode, Variant};
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct Base64Crypt;
impl Variant for Base64Crypt {
type Unpadded = Self;
const PADDED: bool = false;
const BASE: u8 = b'.';
const DECODER: &'static [Decode] = &[
Decode::Range(b'.'..b'9', -45),
Decode::Range(b'A'..b'Z', -52),
Decode::Range(b'a'..b'z', -58),
];
const ENCODER: &'static [Encode] = &[Encode::Apply(b'9', 7), Encode::Apply(b'Z', 6)];
}