Oregami
Repositories/oxedyne/fe2o3

oxedyne/fe2o3/fe2o3_iop_hash/src/kdf.rs

778 bytes, 5 runs

created by r1870400018:417, which is this file's identity for as long as the history lasts, whatever it is later renamed to

download · who wrote it · its history

1use oxedyne_fe2o3_core::prelude::*;
2use oxedyne_fe2o3_namex::id::InNamex;
3
4pub trait KeyDeriver:
5 Clone
6 + std::fmt::Debug
7 + InNamex
8 + Send
9 + Sync
10{
11 fn get_hash(&self) -> Outcome<&[u8]>;
12 fn set_rand_salt(&mut self, n: usize) -> Outcome<()>;
13 fn derive(&mut self, pass: &[u8]) -> Outcome<()>;
14 fn verify(&self, pass: &[u8]) -> Outcome<bool>;
15 // String encoding.
16 fn encode_to_string(&self) -> Outcome<String>;
17 fn encode_cfg_to_string(&self) -> Outcome<String>; // Encoded string sans hash
18 fn decode_from_string(&mut self, s: &str) -> Outcome<()>;
19 fn decode_cfg_from_string(&mut self, s: &str) -> Outcome<()>;
20}