mathstuf / rust-keyutils

Rust interface to the Linux keyring
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Some more type-safe APIs #35

Closed mathstuf closed 4 years ago

mathstuf commented 5 years ago

Some APIs look a little unsafe to use. Namely Key::update just takes a binary blob. Instead, it should be bound to some KeyType argument so that it is done appropriately. A method is_keytype<K>(&self) -> Result<bool> would also be nice to have to be able to check what keytype a given key has.