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
27
28
29
30
31
32
33
use super::{Alphabet, DecodeStep, EncodeStep};
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub struct Base64Bcrypt;
impl Alphabet for Base64Bcrypt {
const BASE: u8 = b'.';
const DECODER: &'static [DecodeStep] = &[
DecodeStep::Range(b'.'..b'/', -45),
DecodeStep::Range(b'A'..b'Z', -62),
DecodeStep::Range(b'a'..b'z', -68),
DecodeStep::Range(b'0'..b'9', 7),
];
const ENCODER: &'static [EncodeStep] = &[
EncodeStep::Apply(b'/', 17),
EncodeStep::Apply(b'Z', 6),
EncodeStep::Apply(b'z', -75),
];
const PADDED: bool = false;
type Unpadded = Self;
}