The tripcode function works as follows:
1. Convert the input to Shift JIS.
2. Generate the salt as follows:
1. Take the second and third characters of the string obtained by appending H.. to the end of the input.
2. Replace any characters not between . and z with ..
3. 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)
Since this is merely a de facto standard, actual implementations vary widely. Most noticeably, many implementations substitute various characters with their HTML entities. For example, 2channel translates , and " to <, >, and ".[2] Other implementations also replace other characters, e.g. & and '. However, this behavior was likely due to a bug in the original implementation, and since each board has different behavior it should not be considered part of the algorithm. Further, some boards don't perform the Shift JIS conversion. Lastly, as a historical note, the original implementation only used the last 8 characters, but this has been fully replaced by 10-character tripcodes.