Hasher와 Cryptographic Hashing Hashable 프로토콜 타입의 객체를 Hasher로 hashing하면 무작위로 생성된 시드를 사용해서 해시값을 생성하여 실행될 때마다 다른 해시값을 생성시켜줍니다. func hashItem(item: String) -> Int { var hasher = Hasher() item.hash(into: &hasher) return hasher.finalize() } // Hashing data let hashValue = hashItem(item: "Hasher로 hash한 Data") // 실행시 마다 다른 해시값 Cryptographic Hashing은 Hasher와 같이 거의 유일한 해시값을 생성하고, 입력값을 조금만 변경해도 해시값이 크게 변합니다..
CryptoKit Documentation: https://developer.apple.com/documentation/CryptoKit (WWDC19)Cryptography and your apps: https://developer.apple.com/videos/play/wwdc2019/709/ (Cryptography and your apps 세션의 Introducing Apple CryptoKit 파트의 정리) CryptoKit에서 할 수 있는 것 Hash 함수: SHA-256, SHA-384, SHA-512 Symmetric-Key Cryptography Message Authentication Code: HMAC Authenticated Encryption: AES-GCM(Chacha20Poly..