steam-friend-code 0.1.2

Encode and decode Steam CS:GO/CS2 friend codes and short Steam quick-invite codes.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Steam friend code utilities.
//!
//! This crate provides two types of Steam friend codes:
//!
//! - **CSGO friend code** ([`CsgoFriendCode`]) — Base32/MD5 encoded codes used
//!   in CS:GO/CS2 in-game friend system (e.g. `ABCDE-FGHJK-LMNPQ`).
//! - **Short Steam friend code** ([`create_short_steam_friend_code`]) — hex-mapped codes
//!   used in Steam quick invite links (`https://s.team/p/{code}/{token}`).

mod csgo_friend_code;
mod short_steam_friend_code;

pub use csgo_friend_code::CsgoFriendCode;
pub use short_steam_friend_code::{create_short_steam_friend_code, parse_quick_invite_link, parse_short_steam_friend_code, SHORT_STEAM_FRIEND_CODE_CHARS};

// Backward-compatible alias
pub type SteamFriendCode = CsgoFriendCode;