pub fn load_material(
key_file: &Path,
iv_file: &Path,
) -> Result<EntropyMaterial, EntropyError>Expand description
Convenience wrapper that loads both files and bundles them.
§Errors
Forwarded from load_key_file / load_iv_file. Both files
are read; if both fail only the first error is returned.
§Examples
use std::path::PathBuf;
use dynomite::entropy::util::load_material;
let mat = load_material(
&PathBuf::from("/etc/dynomite/recon_key.pem"),
&PathBuf::from("/etc/dynomite/recon_iv.pem"),
).unwrap();
assert_eq!(mat.key().as_bytes().len(), 16);