SubjectPublicKeyInfo
internal final class SubjectPublicKeyInfo
The SubjectPublicKeyInfo class represents a data structure defined by the ASN.1 notation.
It is used to encapsulate information related to a public key.
According to the ASN.1 definition, a SubjectPublicKeyInfo consists of two components: an AlgorithmIdentifier
and a subjectPublicKey of type BIT STRING.
The data structures SubjectPublicKeyInfo and AlgorithmIdentifier are defined as follows:
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING
}
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
Note
This class encapsulate just the public key. The algorithm data structure is not included here.-
Declaration
Swift
private(set) var publicKey: OpaquePointer { get } -
Declaration
Swift
private(set) var subjectPublicKeyBytes: [UInt8] { get } -
Initializes a
SubjectPublicKeyInfoobject from anASN1Node.Throws
An error if there is an issue with decoding the provided ASN.1 node into a public key.
Declaration
Swift
internal init(from node: ASN1Node) throwsParameters
nodeAn
ASN1Nodecontaining the encoded public key information. -
Declaration
Swift
deinit
View on GitHub
SubjectPublicKeyInfo Class Reference