himmelblau_kerberos_asn1

Crates.iohimmelblau_kerberos_asn1
lib.rshimmelblau_kerberos_asn1
version0.4.1
sourcesrc
created_at2024-06-21 19:48:47.121102
updated_at2024-07-03 17:46:10.109066
descriptionParse/Build Kerberos ASN1 DER To/From Rust structs
homepage
repositoryhttps://github.com/himmelblau-idm/kerbeiros
max_upload_size
id1279882
size186,692
David Mulder (dmulder)

documentation

README

Kerberos ASN1

This library defines the ASN1 structures used by the Kerberos protocol as Rust structs. Based in the red_asn1 library.

Each type defined in this library provides a method parse to parse an array of bytes and create the type, and a method build to create an array of bytes from the type and its values.

Examples

Decoding a string of Kerberos:

use kerberos_asn1::KerberosString;
use red_asn1::Asn1Object;

let raw_string = &[
                0x1b, 0x0e, 0x4b, 0x49, 0x4e, 0x47, 0x44, 0x4f, 0x4d, 0x2e,
                0x48, 0x45, 0x41, 0x52, 0x54, 0x53,
            ];
let (rest_raw, kerberos_string) = KerberosString::parse(raw_string).unwrap();

assert_eq!("KINGDOM.HEARTS", kerberos_string);  

References

Commit count: 772

cargo fmt