Difference between revisions of "Unit ASN.1"
From Ultibo.org
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
---- | ---- | ||
− | '''Ultibo ASN.1 | + | '''Ultibo ASN.1 Interface unit''' |
Abstract Syntax Notation One (ASN.1) is an interface description language for defining data structures that can be serialized and deserialized in a standard, cross-platform way. It's broadly used in telecommunications and computer networking, and especially in cryptography. | Abstract Syntax Notation One (ASN.1) is an interface description language for defining data structures that can be serialized and deserialized in a standard, cross-platform way. It's broadly used in telecommunications and computer networking, and especially in cryptography. | ||
Line 22: | Line 22: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | | <code>ASN1_TAG_EOC | + | | <code>ASN1_TAG_EOC = $00;</code> |
| Not used with DER | | Not used with DER | ||
|- | |- |
Latest revision as of 04:38, 31 August 2021
Return to Unit Reference
Contents
[hide]Description
Ultibo ASN.1 Interface unit
Abstract Syntax Notation One (ASN.1) is an interface description language for defining data structures that can be serialized and deserialized in a standard, cross-platform way. It's broadly used in telecommunications and computer networking, and especially in cryptography.
This unit currently only provides the basic functionality required by X509 to read and parse a certificate in DER format.
It is expected that this unit will be expanded to incorporate additional functions over time.
Constants
[Expand]
ASN1 specific constants
ASN1_*
Type definitions
ASN1 tag
ASN1 OID
Public variables
None defined
Function declarations
ASN1 functions
[Expand]
function ASN1GetTag(Buffer:PByte; Len:Integer; var Tag:TASN1Tag):Boolean;
Description: To be documented
[Expand]
function ASN1ParseOID(Buffer:PByte; Len:Integer; var OID:TASN1OID):Boolean;
Description: Parse an OID value from the buffer
[Expand]
function ASN1GetOID(Buffer:PByte; Len:Integer; var OID:TASN1OID; var Next:PByte):Boolean;
Description: Read the next ASN1 tag from buffer and decode it as an OID value
[Expand]
function ASN1GetNull(Buffer:PByte; Len:Integer; var Next:PByte):Boolean;
Description: Read the next ASN1 tag from buffer and decode it as a null value
[Expand]
function ASN1ParseInt(Buffer:PByte; Len:Integer; var Value:Integer):Boolean;
Description: Parse an integer value from the buffer
[Expand]
function ASN1ParseBigInt(Buffer:PByte; Len:Integer; var Value:PByte; var Size:Integer):Boolean;
Description: Parse a big integer value from the buffer (Does not include the leading negative byte if present)
[Expand]
function ASN1GetInt(Buffer:PByte; Len:Integer; var Value:Integer; var Next:PByte):Boolean;
Description: Read the next ASN1 tag from buffer and decode it as an integer value
[Expand]
function ASN1ParseBoolean(Buffer:PByte; Len:Integer; var Value:Boolean):Boolean;
Description: Parse a boolean value from the buffer
[Expand]
function ASN1GetBoolean(Buffer:PByte; Len:Integer; var Value:Boolean; var Next:PByte):Boolean;
Description: Read the next ASN1 tag from buffer and decode it as a boolean value
ASN1 helper functions
[Expand]
function ASN1OIDEqualPrefix(const OIDPrefix,OID:TASN1OID):Boolean;
Description: To be documented
[Expand]
function ASN1BitStringToLongWord(Buffer:PByte; Len:Integer):LongWord;
Description: To be documented
Return to Unit Reference