Initializerswift-crypto 3.12.2Crypto
init
Creates a new random nonce.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
init()
The default nonce is a 12-byte random nonce.
Creates a new random nonce.
init()
The default nonce is a 12-byte random nonce.
import Crypto
A cryptography library for Swift.
struct Nonce
A value used once during a cryptographic operation and then discarded.
enum AES
A container for Advanced Encryption Standard (AES) ciphers.
enum GCM
The Advanced Encryption Standard (AES) Galois Counter Mode (GCM) cipher suite.
init<D>(data: D) throws where D : DataProtocol
Creates a nonce from the given data.
func makeIterator() -> Array<UInt8>.Iterator
Returns an iterator over the elements of the nonce.
func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
Calls the given closure with a pointer to the underlying bytes of the array’s contiguous storage.