11 releases (6 stable)
1.0.5 | Jan 28, 2022 |
---|---|
1.0.4 | Jan 21, 2022 |
1.0.3 | Jan 23, 2019 |
1.0.0 | Sep 19, 2018 |
0.2.0 | Feb 16, 2018 |
#494 in Authentication
Used in aprshttp
9KB
134 lines
An APRS-IS passcode generator and type.
Usage
The Callpass
type is used for representing an APRS-IS passcode.
It will transform a callsign into a passcode, and can be used in
place of integers where expecting a callpass.
let given_callsign = "x2yz";
let given_callpass = 29322i64;
We can generate a Callpass
like so, using the From trait:
// This step will generate an APRS-IS passcode.
let callpass: Callpass = given_callsign.into();
If we already have an APRS-IS passcode as an integer, we can
make a Callpass
from that as well to gain the benefits of type
checking:
let their_callpass: Callpass = given_callpass.into();
assert!(their_callpass == given_callpass);
Dependencies
~0.1–1MB
~18K SLoC