cloudflare / boringtun

Userspace WireGuard® Implementation in Rust
BSD 3-Clause "New" or "Revised" License
5.93k stars 397 forks source link

Do not wrap keys in Arc #274

Closed agrover closed 2 years ago

agrover commented 2 years ago

With new key types, since they implement Copy (PublicKey) or Clone (StaticSecret) this is not necessary. Copying 32 bytes should be less overhead than incrementing the Arc.