diff --git a/Sources/Crypto.swift b/Sources/Crypto.swift index 059a5ef..021ac5e 100644 --- a/Sources/Crypto.swift +++ b/Sources/Crypto.swift @@ -78,7 +78,14 @@ protocol SecureEnclaveMLKEM768PrivateKey { #if !os(Linux) && !os(Windows) class CryptoKitCrypto: Crypto { - let context = LAContext() + let context: LAContext = { + let ctx = LAContext() + if let prompt = ProcessInfo.processInfo.environment["AGE_PLUGIN_SE_PROMPT"], + !prompt.isEmpty { + ctx.localizedReason = prompt + } + return ctx + }() var isSecureEnclaveAvailable: Bool { return SecureEnclave.isAvailable