[][src]Trait kerberos_asn1::Asn1Object

pub trait Asn1Object: Default {
    fn tag() -> Tag;
fn build_value(&self) -> Vec<u8>;
fn parse_value(&mut self, raw: &[u8]) -> Result<(), Error>; fn build(&self) -> Vec<u8> { ... }
fn parse(raw: &[u8]) -> Result<(&[u8], Self), Error> { ... } }

A trait to allow objects to be built/parsed from ASN1-DER

Required methods

fn tag() -> Tag

Method to retrieve the tag of the object, used to identify each object in ASN1

fn build_value(&self) -> Vec<u8>

Method which indicates how object value must be built

fn parse_value(&mut self, raw: &[u8]) -> Result<(), Error>

Method which indicates how object value must be parsed

Loading content...

Provided methods

fn build(&self) -> Vec<u8>

To encode the object to DER, generally does not need to be overwritten. Usually, just encode_value should be overwritten

fn parse(raw: &[u8]) -> Result<(&[u8], Self), Error>

To parse the object from DER, generally does not need to be overwritten. Usually, just parse_value should be overwritten

Loading content...

Implementations on Foreign Types

impl Asn1Object for i128[src]

impl Asn1Object for i64[src]

impl<T> Asn1Object for Vec<T> where
    T: Asn1Object
[src]

impl<T> Asn1Object for Option<T> where
    T: Asn1Object
[src]

impl Asn1Object for bool[src]

impl Asn1Object for Vec<u8>[src]

impl Asn1Object for i32[src]

impl Asn1Object for String[src]

impl Asn1Object for GeneralizedTime[src]

impl Asn1Object for BitString[src]

impl Asn1Object for u32[src]

impl Asn1Object for i16[src]

impl Asn1Object for AsciiString[src]

Loading content...

Implementors

impl Asn1Object for AdAndOr[src]

impl Asn1Object for AdKdcIssued[src]

impl Asn1Object for ApRep[src]

impl Asn1Object for ApReq[src]

impl Asn1Object for AsRep[src]

impl Asn1Object for AsReq[src]

impl Asn1Object for Authenticator[src]

impl Asn1Object for AuthorizationData[src]

impl Asn1Object for Checksum[src]

impl Asn1Object for EncApRepPart[src]

impl Asn1Object for EncAsRepPart[src]

impl Asn1Object for EncKdcRepPart[src]

impl Asn1Object for EncKrbCredPart[src]

impl Asn1Object for EncKrbPrivPart[src]

impl Asn1Object for EncTgsRepPart[src]

impl Asn1Object for EncTicketPart[src]

impl Asn1Object for EncryptedData[src]

impl Asn1Object for EncryptionKey[src]

impl Asn1Object for EtypeInfo2Entry[src]

impl Asn1Object for EtypeInfoEntry[src]

impl Asn1Object for HostAddress[src]

impl Asn1Object for KdcReq[src]

impl Asn1Object for KdcReqBody[src]

impl Asn1Object for KerbAdRestrictionEntry[src]

impl Asn1Object for KerbErrorData[src]

impl Asn1Object for KerbPaPacRequest[src]

impl Asn1Object for KerberosFlags[src]

impl Asn1Object for KerberosTime[src]

impl Asn1Object for KrbCred[src]

impl Asn1Object for KrbCredInfo[src]

impl Asn1Object for KrbError[src]

impl Asn1Object for KrbPriv[src]

impl Asn1Object for KrbSafe[src]

impl Asn1Object for KrbSafeBody[src]

impl Asn1Object for LastReqEntry[src]

impl Asn1Object for PaData[src]

impl Asn1Object for PaEncTsEnc[src]

impl Asn1Object for PaForUser[src]

impl Asn1Object for PaPacOptions[src]

impl Asn1Object for PaS4uX509User[src]

impl Asn1Object for PrincipalName[src]

impl Asn1Object for S4uUserId[src]

impl Asn1Object for TgsRep[src]

impl Asn1Object for TgsReq[src]

impl Asn1Object for Ticket[src]

impl Asn1Object for TransitedEncoding[src]

impl Asn1Object for TypedDataEntry[src]

Loading content...