Skip to content

Instantly share code, notes, and snippets.

View manicmachine's full-sized avatar

Corey Oliphant manicmachine

View GitHub Profile
@manicmachine
manicmachine / ChaChaPoly_Encryption.playground
Last active May 27, 2025 13:51
ChaChaPoly encryption in Swift with CryptoKit
import Foundation
import CryptoKit
extension SymmetricKey {
init?(base64EncodedString: String) {
guard let data = Data(base64Encoded: base64EncodedString) else {
return nil
}
self.init(data: data)