init(copying:)
Creates a nonce from the given data.
Declaration
init(copying bytes: RawSpan) throwsParameters
- bytes:
The bytes that represent the nonce. The initializer throws an error if the data has a length smaller than 12 bytes.
Discussion
Unless your use case calls for a nonce with a specific value, use the init() method to instead create a random nonce.