You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method to load a file seems to assume that a file must already have the right format (e.g. be armored), and I'm not sure how it would be possible to verify whether that file is encrypted at all, or whether it's armored or it has bytes instead.
In this code below, if string_encrypted is actually not encrypted but some random text, Message::from_armor_single will return an error. That seems unexpected to me because, message may be a Message::Literal.
let cursor_encrypted = Cursor::new(&string_encrypted);let(message, _) = Message::from_armor_single(cursor_encrypted)?;
Is there maybe a more generic method to build a Message ?
The text was updated successfully, but these errors were encountered:
The method to load a file seems to assume that a file must already have the right format (e.g. be armored), and I'm not sure how it would be possible to verify whether that file is encrypted at all, or whether it's armored or it has bytes instead.
In this code below, if
string_encrypted
is actually not encrypted but some random text,Message::from_armor_single
will return an error. That seems unexpected to me because,message
may be aMessage::Literal
.Is there maybe a more generic method to build a
Message
?The text was updated successfully, but these errors were encountered: