/// Load KeyStore from reader.  Expects a hex encoded 1024-bit master key, from which the KeyStore is derived.
Load KeyStore from reader.  Expects a hex encoded 1024-bit master key, from which the KeyStore is derived.
Load KeyStore from reader . Expects a hex encoded 1024 - bit master key from which the KeyStore is derived .
pub fn load<R: io::Read>(mut reader: R) -> Result<KeyStore> {
		let mut hexbytes = [0u8; 256];
		reader.read_exact(&mut hexbytes)?;
		let slice = HEXLOWER_PERMISSIVE.decode(&hexbytes).map_err(|_| Error::CorruptKeystore)?;
		let master_key = HmacKey::from_slice(&slice).ok_or(Error::CorruptKeystore)?;
		Ok(KeyStore::from_master_key(master_key))
	}
pub fn load < R : io :: Read > ( mut reader : R ) -> Result < KeyStore > { let mut hexbytes = [ 0u8 ; 256 ] ; reader . read_exact ( & mut hexbytes ) ? ; let slice = HEXLOWER_PERMISSIVE . decode ( & hexbytes ) . map_err ( | _ | Error :: CorruptKeystore ) ? ; let master_key = HmacKey :: from_slice ( & slice ) . ok_or ( Error :: CorruptKeystore ) ? ; Ok ( KeyStore :: from_master_key ( master_key ) ) }
Load KeyStore from reader.
Load KeyStore from reader .
reader
R