ExTripcode v1.0.0 ExTripcode.Hasher View Source

This module implements the hashing of values to generate tripcodes.

Link to this section Summary

Functions

Generate a regular tripcode.

Generate a secure tripcode.

Link to this section Functions

Generate a regular tripcode.

Regular tripcodes are generated as follows:

  1. Convert the input to Shift JIS.
  2. Generate the salt as follows: a. Take the second and third characters of the string obtained by appending H.. to the end of the input. b. Replace any characters not between . and z with .. c. Replace any of the characters in :;<=>?@[]^_` with the corresponding character from ABCDEFGabcdef. 3. Call the crypt() function with the input and salt. 4. Return the last 10 characters. (compressional data harvest)

Generate a secure tripcode.

Secure tripcodes are generated as follows:

  1. Convert the input to Shift JIS.
  2. Create a hash by taking the SHA1 sum of input & the base64 decoded seed.
  3. Base64 encode this hash.
  4. Return the first 15 characters.