class ComplexConfig::Provider
def decrypt_data(ciphertext, pathname = nil)
-
(String, nil)- the decrypted plain text, or nil if no valid key was found
Parameters:
-
pathname(String, nil) -- an optional path used to locate a key file (e.g., .key) -
ciphertext(String) -- the encrypted data to decrypt
def decrypt_data(ciphertext, pathname = nil) ks = key_source(pathname) return nil unless ks && ks.key ComplexConfig::Encryption.new(ks.key_bytes).decrypt(ciphertext) end