diff --git a/src/key.rs b/src/key.rs index bb7ac3115..434a3b039 100644 --- a/src/key.rs +++ b/src/key.rs @@ -1,7 +1,6 @@ use std::collections::BTreeMap; use std::ffi::{CStr, CString}; use std::io::Cursor; -use std::slice; use libc; use pgp::composed::{Deserializable, SignedPublicKey, SignedSecretKey}; @@ -106,15 +105,6 @@ impl Key { } } - pub fn from_binary(data: *const u8, len: libc::c_int, key_type: KeyType) -> Option { - if data.is_null() || len == 0 { - return None; - } - - let bytes = unsafe { slice::from_raw_parts(data, len as usize) }; - Self::from_slice(bytes, key_type) - } - pub fn from_armored_string( data: &str, key_type: KeyType,