Data
extension Data: ASN1CodableType
-
Declaration
Swift
public init(from asn1: ASN1Object) throws
-
Undocumented
Declaration
Swift
public init(bitString: Data) throws
-
Undocumented
Declaration
Swift
public static func asn1decoded(_ object: ASN1Object) throws -> Data
-
Declaration
Swift
public func asn1encode(tag: ASN1DecodedTag? = nil) -> ASN1Object
-
Undocumented
Declaration
Swift
public func asn1bitStringEncode(unused bits: Int = 0, tag: ASN1DecodedTag? = nil) throws -> ASN1Object
-
Parse ASN.1 Data block as Integer
Declaration
Swift
public var asn1integer: Int? { get }
Return Value
Signed Integer or nil when block is too short (e.g. empty) or too big > Int.max.
-
Map Data block self to
UInt
Discussion: Combines the bytes
[UInt8]
toUInt
by shifting the bytes in most significant byte order (Big-endian). The length of byte array should not be greater thansizeof(UInt)
so not to overflow the return value.
Note
In case of overflow nil is returned
Declaration
Swift
public var unsignedIntValue: UInt? { get }
Return Value
UInt
value ornil