Skip to content

Checking for errors in aead::seal #290

Answered by vlmutolo
is-ahmed asked this question in Q&A
Discussion options

You must be logged in to vote

I'm having a hard time reproducing the error on my machine. Could you provide a series of steps to get to the crypto error from a freshly cloned repo?

That said, if I had to guess, I'd bet you're probably passing in an empty buffer to encrypt.


EDIT: I got it to reproduce. The created $HOME/.arustylock has to be missing first, so the following command works on a fresh repo to reproduce:

rm -rf $HOME/.arustylock && cargo run

Also I confirmed that the buffer is empty, which is causing the error. I added

dbg!(buffer.is_empty());

on line 10, just before the call to aead::seal, and it printed true.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@is-ahmed
Comment options

Answer selected by is-ahmed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants