Instance Methodswift-crypto 3.12.2_CryptoExtras->Crypto
withUnsafeBytes(_:)
ChaCha20CTR.swift:120- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R
s6Crypto8InsecureO01_A6ExtrasE11ChaCha20CTRO7CounterV15withUnsafeBytesyxxSWKXEKlF
What are these?3LV0A
import Crypto
A cryptography library for Swift.
import _CryptoExtras
Provides additional cryptographic APIs that are not available in CryptoKit (and therefore the core Crypto library).
struct Counter
enum Insecure
A container for older, cryptographically insecure algorithms.
enum ChaCha20CTR
ChaCha20-CTR with 96-bit nonces and a 32 bit counter.
@frozen struct UnsafeRawBufferPointer
A nonowning collection interface to the bytes in a region of memory.
init()
Generates a fresh Counter set to 0. Unless required by a specification to provide a specific Counter, this is the recommended initializer.
init<D>(data: D) throws where D : DataProtocol
Explicitly set the Counter’s offset using a byte sequence
init(offset: UInt32) throws
Explicitly set the Counter’s offset using a UInt32