Static Methodswift-crypto 3.8.0_CryptoExtras->Crypto
encrypt(_:using:counter:nonce:)
Encrypts data using ChaCha20CTR
ChaCha20CTR.swift:40static func encrypt<Plaintext>(_ message: Plaintext, using key: SymmetricKey, counter: Insecure.ChaCha20CTR.Counter = Counter(), nonce: Insecure.ChaCha20CTR.Nonce) throws -> Data where Plaintext : DataProtocol
Parameters
Returns
The encrypted ciphertext
Throws
CipherError errors