Trait tripcode::TripcodeGenerator [] [src]

pub trait TripcodeGenerator {
    type Hash: TripcodeHash;
    fn hash<P: AsRef<[u8]>>(password: P) -> Self::Hash;

    fn generate<P: AsRef<[u8]>>(password: P) -> String { ... }
    fn append<P: AsRef<[u8]>>(password: P, dst: &mut String) { ... }
    fn write<P, W>(password: P, dst: &mut W) -> Result<()>
        P: AsRef<[u8]>,
        W: Write
, { ... } fn generate_sjis<P: AsRef<[u8]>>(password: P) -> Vec<u8> { ... } fn append_sjis<P: AsRef<[u8]>>(password: P, dst: &mut Vec<u8>) { ... } fn write_sjis<P, W>(password: P, dst: &mut W) -> Result<()>
        P: AsRef<[u8]>,
        W: Write
, { ... } }

Trait for generators of tripcodes.

Associated Types

The type of hash value that represents resulting tripcodes.

See the documentation for tripcode::hash module for the information of the hash value.

Required Methods

Generates a hash value that represents the tripcode for password.

Provided Methods

Generates a tripcode from password.

Generates a tripcode from password and appends it to a String.

Generates a tripcode into a Write.

Generates a tripcode in Shift-JIS encoding.

Generates a Shift-JIS-encoded tripcode and appends it to a Vec<u8>.

Generates a Shift-JIS-encoded tripcode into a Write.