Skip to main content

from_json_text

Function from_json_text 

Source
pub fn from_json_text(
    text: &str,
    source: impl Into<String>,
) -> Result<CypherKeyring, KeyringError>
Expand description

Reads a cypher document out of JSON text, naming source in every refusal.

The options are taken all the way to a FieldCipher and the cipher thrown away again: parsing only decodes the material, and it is the cipher that judges whether 32 bytes came out of it and whether keyId names a key that is actually there.