Struct tripcode::Des
[−]
[src]
pub struct Des;
Generator for DES-based tripcodes (4chan and 2channel's 10-character tripcode) that accepts custom salt characters.
It is essentially the same as crypt(3)
, but treats invalid salt characters in 4chan and
2channel's fashion. Invalid salt characters are reinterpreted as per the following table.
0x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
00 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
10 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
20 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
/ |
30 | 0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
C |
D |
E |
F |
40 | G |
A |
B |
C |
D |
E |
F |
G |
H |
I |
J |
K |
L |
M |
N |
O |
50 | P |
Q |
R |
S |
T |
U |
V |
W |
X |
Y |
Z |
a |
b |
c |
d |
e |
60 | f |
a |
b |
c |
d |
e |
f |
g |
h |
i |
j |
k |
l |
m |
n |
o |
70 | p |
q |
r |
s |
t |
u |
v |
w |
x |
y |
z |
. |
. |
. |
. |
. |
80 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
90 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
A0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
B0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
C0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
D0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
E0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
F0 | . |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
. |
Reference
- https://osdn.jp/projects/naniya/wiki/2chtrip (Japanese)
Methods
impl Des
[src]
fn hash<P: AsRef<[u8]>>(password: P, salt1: u8, salt2: u8) -> FourchanHash
Generates a hash value from password
and a pair of custom salt characters.
fn generate<P: AsRef<[u8]>>(password: P, salt1: u8, salt2: u8) -> String
Generates a tripcode from password
and a pair of custom salt characters.
fn append<P: AsRef<[u8]>>(password: P, salt1: u8, salt2: u8, dst: &mut String)
Generates a tripcode and appends it to a String
.
fn write<P, W>(password: P, salt1: u8, salt2: u8, dst: &mut W) -> Result<()> where
P: AsRef<[u8]>,
W: Write,
P: AsRef<[u8]>,
W: Write,
Generates a tripcode into a Write
.