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

Cannot clone a SecretVec<u8> as u8 is not CloneableSecret #1070

Closed
Kerollmops opened this issue Oct 30, 2022 · 2 comments
Closed

Cannot clone a SecretVec<u8> as u8 is not CloneableSecret #1070

Kerollmops opened this issue Oct 30, 2022 · 2 comments

Comments

@Kerollmops
Copy link

There can't seem to be a way to clone a SecretVec<u8> because Clone is only implemented on Secret<Vec<S>> where S: CloneableSecret + Zeroize and obviously u8 is not CloneableSecret but is Zeroize.

I think the right implementation should be Secret<Vec<S>> where S: Zeroize and avoid implying CloneableSecret, am I right?

@Sytten
Copy link

Sytten commented Nov 8, 2023

Also facing this issue, kinda of annoying...

@tony-iqlusion
Copy link
Member

Closing in favor of #1233

tony-iqlusion added a commit that referenced this issue Oct 9, 2024
Impls `Clone` for `SecretSlice` when the `S` generic type is
`CloneableSecret + Zeroize`.

As originally requested in #1070, also marks the integer primitive types
as `CloneableSecret`, which makes it possible to clone a
`SecretSlice<u8>`.

Closes #1233
tony-iqlusion added a commit that referenced this issue Oct 9, 2024
Impls `Clone` for `SecretSlice` when the `S` generic type is
`CloneableSecret + Zeroize`.

As originally requested in #1070, also marks the integer primitive types
as `CloneableSecret`, which makes it possible to clone a
`SecretSlice<u8>`.

Closes #1233
tony-iqlusion added a commit that referenced this issue Oct 9, 2024
Impls `Clone` for `SecretSlice` when the `S` generic type is
`CloneableSecret + Zeroize`.

As originally requested in #1070, also marks the integer primitive types
as `CloneableSecret`, which makes it possible to clone a
`SecretSlice<u8>`.

Closes #1233
tony-iqlusion added a commit that referenced this issue Oct 9, 2024
Impls `Clone` for `SecretSlice` when the `S` generic type is
`CloneableSecret + Zeroize`.

As originally requested in #1070, also marks the integer primitive types
as `CloneableSecret`, which makes it possible to clone a
`SecretSlice<u8>`.

Closes #1233
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

3 participants