makeIterator
TypeScriptmakeIterator(): SDKHandleSwift declarationfunc makeIterator() -> Array<UInt8>.IteratorReturns an iterator over the elements of the nonce.
struct · iOS 13.0+ · SDK 27.1
struct NonceA value used once during a cryptographic operation and then discarded. Don’t reuse the same nonce for multiple calls to encryption APIs. It’s critical that nonces are unique per call to encryption APIs in order to protect the integrity of the encryption.
makeIterator(): SDKHandleSwift declarationfunc makeIterator() -> Array<UInt8>.IteratorReturns an iterator over the elements of the nonce.
withUnsafeBytes(body: ((arg0: ArrayBuffer) => unknown)): unknownSwift declarationfunc withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> RCalls the given closure with the contents of underlying storage. - note: Calling `withUnsafeBytes` multiple times does not guarantee that the same buffer pointer will be passed in every time. - warning: The buffer argument to the body should not be stored or used outside of the lifetime of the call to the closure. Clients should prefer the `withBytes` function to this one, because `withBytes` uses the non-escapable type `RawSpan` to ensure that the buffer argument is not stored outside of the closure.
static initData(data: ArrayBuffer): ChaChaPoly_NonceSwift declarationinit<D>(data: D) throws where D : DataProtocolCreates a nonce from the given data. Unless your use case calls for a nonce with a specific value, use the ``init()`` method to instead create a random nonce. - Parameters: - data: A 12-byte data representation of the nonce. The initializer throws an error if the data isn't 12 bytes long.
get count(): numberSwift declarationvar count: Int { get }The number of bytes stored in the nonce.
static init(): ChaChaPoly_NonceSwift declarationinit()Creates a new random nonce. The default nonce is a 12-byte random nonce.
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
ChaChaPoly.Nonce.init(copying:)
The iOS SDK compiler rejected this binding: instance method 'arg' requires that 'RawSpan' conform to 'Escapable'
ChaChaPoly.Nonce.bytes
The iOS SDK compiler rejected this binding: argument type 'RawSpan' does not conform to expected type 'Escapable'