ExTripcode v1.0.0 ExTripcode.Hasher View Source
This module implements the hashing of values to generate tripcodes.
Link to this section Summary
Link to this section Functions
Link to this function
hash(input) View Source
Generate a regular tripcode.
Regular tripcodes are generated as follows:
- Convert the input to Shift JIS.
- 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)
Link to this function
hash(input, seed) View Source
Generate a secure tripcode.
Secure tripcodes are generated as follows:
- Convert the input to Shift JIS.
- Create a hash by taking the SHA1 sum of input & the base64 decoded seed.
- Base64 encode this hash.
- Return the first 15 characters.