Skip to main content

find_working_key

Function find_working_key 

Source
fn find_working_key<'a>(
    access: &'a [VaultAccess],
    keychain: &Keychain,
) -> Result<VaultKey<'a>, OnePasswordError>
Expand description

Finds a readable access entry whose vault key the keychain can already decrypt.

Without one, the reason is Unsupported when a readable entry uses a scheme we cannot decrypt, otherwise NoAccess: a vault the account can see but not open. A malformed envelope is an error.