Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...

    Helper class to validate ASN.1 values against schemas

    Some schemas are basic types, others are more complex Basic types are defined as:

    More complex types are defined as:

    • Choice: { choice: [ schema1, schema2, ... ] }

    • Sequence of: { sequenceOf: schema }

    • Optional: { optional: schema }

    • Context Tag: { type: 'context'; kind: 'implicit' | 'explicit'; contains: schema; value: number }

    • OID: { type: 'oid'; oid: string }

    • String: { type: 'string'; kind: 'printable' | 'ia5' | 'utf8' }

    • Date: { type: 'date'; kind: 'utc' | 'general' }

    • Fixed Integer: bigint (where the value is the exact integer required)

    • Sequence: [ schema1, schema2, ... ] (a tuple where each item is a schema)

    • Lazy Schema: () => schema (a function that returns a schema, useful for recursive schemas)

    Type Parameters

    Index

    Constructors

    Properties

    IsAny: typeof IsAny = ...

    Validate that the tag is any valid ASN.1 type

    IsAnyDate: typeof IsAnyDate = ...

    Validate the tag is either a GeneralizedTime or UTCTime

    IsAnyString: typeof IsAnyString = ...

    Validate that the tag is any string type of PrintableString, IA5String, or UTF8String

    IsBitString: typeof IsBitString = ...

    Validate that the tag is a BitString

    IsBoolean: typeof IsBoolean = ...

    Validate that the tag is a Boolean

    IsDate: typeof IsDate = ...

    Validate the tag is either a GeneralizedTime or UTCTime depending on the value (i.e. before or after 2050) as per RFC 5280

    IsInteger: typeof IsInteger = ...

    Validate that the tag is an Integer

    IsNull: typeof IsNull = ...

    Validate that the tag is a Null

    IsOctetString: typeof IsOctetString = ...

    Validate that the tag is an OctetString

    IsOID: typeof IsOID = ...

    Validate that the tag is an Object Identifier (OID)

    IsSet: typeof IsSet = ...

    Validate that the tag is a Set

    IsString: typeof IsString = ...

    Validate that the tag is the least-requisite string type (i.e. PrintableString, IA5String, or UTF8String) for the value

    IsUnknown: typeof IsUnknown = ...

    Validate that the tag is any valid ASN.1 type, but do not attempt to interpret it

    Methods