Struct tripcode::Sc
[−]
[src]
pub struct Sc;
Generator for tripcodes on 2ch.sc.
The format of resulting tripcodes is determined as follows:
- If the password is 12 or greater bytes long and:
- begins with
'#'
sign -> Nama key tripcode (生キートリップ). - begins with
'$'
sign and:- the
'$'
sign is followed by a half-width katakana character -> Katakana tripcode (カタカナトリップ). - else -> 15-character tripcode (15桁トリップ).
- the
- else -> 12-character tripcode (12桁トリップ).
- begins with
- else -> 10-character tripcode.
The following is the list of characters to be treated as half-width katakanas above:
。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙゚
Trait Implementations
impl TripcodeGenerator for Sc
[src]
type Hash = ScHash
The type of hash value that represents resulting tripcodes. Read more
fn hash<P: AsRef<[u8]>>(password: P) -> ScHash
Generates a hash value that represents the tripcode for password
.
fn generate<P: AsRef<[u8]>>(password: P) -> String
Generates a tripcode from password
.
fn append<P: AsRef<[u8]>>(password: P, dst: &mut String)
Generates a tripcode from password
and appends it to a String
.
fn write<P, W>(password: P, dst: &mut W) -> Result<()> where
P: AsRef<[u8]>,
W: Write,
P: AsRef<[u8]>,
W: Write,
Generates a tripcode into a Write
.
fn generate_sjis<P: AsRef<[u8]>>(password: P) -> Vec<u8>
Generates a tripcode in Shift-JIS encoding.
fn append_sjis<P: AsRef<[u8]>>(password: P, dst: &mut Vec<u8>)
Generates a Shift-JIS-encoded tripcode and appends it to a Vec<u8>
.
fn write_sjis<P, W>(password: P, dst: &mut W) -> Result<()> where
P: AsRef<[u8]>,
W: Write,
P: AsRef<[u8]>,
W: Write,
Generates a Shift-JIS-encoded tripcode into a Write
.