Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to serialize / deserialize Nonce #620

Closed
Antosser opened this issue Aug 1, 2024 · 1 comment
Closed

How to serialize / deserialize Nonce #620

Antosser opened this issue Aug 1, 2024 · 1 comment

Comments

@Antosser
Copy link

Antosser commented Aug 1, 2024

How can I define the Nonce type? This fails:

    struct Ser {
        nonce: Nonce<U12>,
    }
not found in this scope

Converting to a slice also doesn't seem to work, since it's unsized

    let nonce = aes_gcm::Aes256Gcm::generate_nonce(&mut rng).as_slice(); // &[u8]

How do I serialize a nonce?

@Antosser
Copy link
Author

Antosser commented Aug 5, 2024

Reading over it again, it seems I've not been as clear as I thought. I'll reopen a new issue right away

@Antosser Antosser closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant