pub fn create_key_buffer(data: &[u8]) -> Result<KeyBuffer, &'static str>
Create a key buffer from a slice