pub struct Sc;
Expand description
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§
Source§impl TripcodeGenerator for Sc
impl TripcodeGenerator for Sc
Source§fn hash<P: AsRef<[u8]>>(password: P) -> ScHash
fn hash<P: AsRef<[u8]>>(password: P) -> ScHash
Generates a hash value that represents the tripcode for
password
.Source§fn append<P: AsRef<[u8]>>(password: P, dst: &mut String)
fn append<P: AsRef<[u8]>>(password: P, dst: &mut String)
Generates a tripcode from
password
and appends it to a String
.Source§fn generate_sjis<P: AsRef<[u8]>>(password: P) -> Vec<u8> ⓘ
fn generate_sjis<P: AsRef<[u8]>>(password: P) -> Vec<u8> ⓘ
Generates a tripcode in Shift-JIS encoding.
Auto Trait Implementations§
impl Freeze for Sc
impl RefUnwindSafe for Sc
impl Send for Sc
impl Sync for Sc
impl Unpin for Sc
impl UnwindSafe for Sc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> TripcodeGeneratorFailable for Twhere
T: TripcodeGenerator,
impl<T> TripcodeGeneratorFailable for Twhere
T: TripcodeGenerator,
Source§type Hash = <T as TripcodeGenerator>::Hash
type Hash = <T as TripcodeGenerator>::Hash
The type of hash value that represents resulting tripcodes. Read more
Source§fn try_hash<P>(password: P) -> Option<<T as TripcodeGeneratorFailable>::Hash>
fn try_hash<P>(password: P) -> Option<<T as TripcodeGeneratorFailable>::Hash>
Attempts to generate a hash value from
password
. Read moreSource§fn try_generate<P: AsRef<[u8]>>(password: P) -> Option<String>
fn try_generate<P: AsRef<[u8]>>(password: P) -> Option<String>
Attempts to generate a tripcode from
password
. Read moreSource§fn try_append<P: AsRef<[u8]>>(password: P, dst: &mut String) -> Option<()>
fn try_append<P: AsRef<[u8]>>(password: P, dst: &mut String) -> Option<()>
Attempts to generate a tripcode and append it to a
String
. Read moreSource§fn try_write<P, W>(password: P, dst: &mut W) -> Option<Result<()>>
fn try_write<P, W>(password: P, dst: &mut W) -> Option<Result<()>>
Attempts to generate a tripcode into a
Write
. Read moreSource§fn try_generate_sjis<P: AsRef<[u8]>>(password: P) -> Option<Vec<u8>>
fn try_generate_sjis<P: AsRef<[u8]>>(password: P) -> Option<Vec<u8>>
Attempts to generate a tripcode in Shift-JIS encoding. Read more