Module tools

Source
Expand description

Various helper functions, that are used by RADIUS Client & Server to encode/decode information inside RADIUS packet They are also available to crate users to prepare data before it is packed into RADIUS packet

Functionsยง

bytes_to_integer
Converts integer bytes into u32
bytes_to_integer64
Converts integer64 bytes into u64
bytes_to_interfaceid_string
Converts ifid bytes into String
bytes_to_ipv4_string
Converts IPv4 bytes into IPv4 string
bytes_to_ipv6_string
Converts IPv6 bytes into IPv6 string
bytes_to_timestamp
Converts date bytes into u32 (timestamp)
decrypt_data
Decrypts data since RADIUS packet is sent in plain text
encrypt_data
Encrypts data since RADIUS packet is sent in plain text
integer64_to_bytes
Converts u64 into vector of bytes
integer_to_bytes
Converts u32 into vector of bytes
interfaceid_string_to_bytes
Converts Ifid (Interface Id) string into vector of bytes
ipv4_string_to_bytes
Converts IPv4 Address string into vector of bytes
ipv6_string_to_bytes
Converts IPv6 Address string into vector of bytes
salt_decrypt_data
Decrypts data with salt since RADIUS packet is sent in plain text
salt_encrypt_data
Encrypts data with salt since RADIUS packet is sent in plain text
timestamp_to_bytes
Converts timestamp (u32) into vector of bytes