From d43f4accb37bbd3dd554633c519d4c86050ffc69 Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Sun, 20 Oct 2024 11:32:20 +0530 Subject: [PATCH] Add support for new Android overlay, swiftlang/swift#74758 --- Sources/Crypto/Key Derivation/HKDF.swift | 3 +++ .../Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Sources/Crypto/Key Derivation/HKDF.swift b/Sources/Crypto/Key Derivation/HKDF.swift index aa8dda9a..25a0c2f2 100644 --- a/Sources/Crypto/Key Derivation/HKDF.swift +++ b/Sources/Crypto/Key Derivation/HKDF.swift @@ -15,6 +15,9 @@ @_exported import CryptoKit #else import Foundation +#if canImport(Android) +import Android +#endif /// A standards-based implementation of an HMAC-based Key Derivation Function /// (HKDF). diff --git a/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift b/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift index 1076de1a..421db762 100644 --- a/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift +++ b/Sources/_CryptoExtras/Key Derivation/Scrypt/BoringSSL/Scrypt_boring.swift @@ -21,6 +21,10 @@ import Foundation @_implementationOnly import CCryptoBoringSSL @_implementationOnly import CCryptoBoringSSLShims +#if canImport(Android) +import Android +#endif + internal struct BoringSSLScrypt { /// Derives a secure key using the provided passphrase and salt. ///