Initializerswift-certificates 1.8.0X509
init(bytes:)
Construct a serial number from its raw big-endian bytes.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init(bytes: ArraySlice<UInt8>)
Parameters
- bytes
The raw big-endian bytes of the serial number.
Construct a serial number from its raw big-endian bytes.
init(bytes: ArraySlice<UInt8>)
s4X50911CertificateV12SerialNumberV5bytesAEs10ArraySliceVys5UInt8VG_tcfc
What are these?88DY6
The raw big-endian bytes of the serial number.
import X509
A library for working with X.509 certificates.
struct SerialNumber
A number that uniquely identifies a certificate issued by a specific certificate authority.
struct Certificate
@frozen struct ArraySlice<Element>
A slice of an Array
, ContiguousArray
, or ArraySlice
instance.
@frozen struct UInt8
An 8-bit unsigned integer value type.
init()
Construct a random 20-byte serial number.
init<Number>(_ number: Number) where Number : FixedWidthInteger
Construct a serial number from a fixed width integer.
init(bytes: [UInt8])
Construct a serial number from its raw big-endian bytes.
init<Bytes>(bytes: Bytes) where Bytes : Collection, Bytes.Element == UInt8
Construct a serial number from its raw big-endian bytes.
init(integerLiteral number: StaticBigInt)
Constructs a serial number from an integer.
var bytes: ArraySlice<UInt8>
The raw big-endian bytes of the serial number.
var description: String { get }