pub fn aprs_is_passcode(callsign: &str) -> i32Expand description
Compute the APRS-IS passcode from a callsign.
The algorithm is a simple hash of the callsign characters (without SSID). This is NOT cryptographic – it is a well-known public algorithm used by all APRS software.
§Algorithm
- Strip SSID (everything from
-onward). - Uppercase the base callsign.
- Starting with hash = 0x73E2, XOR each pair of bytes: first byte shifted left 8 bits, second byte as-is. If the callsign has an odd number of characters, the last byte is XOR’d shifted left 8 bits.
- Mask with 0x7FFF to produce a positive 15-bit value.