mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
curve: Mark scalar::clamp_integer as must_use (#558)
This commit is contained in:
parent
6dd17b2836
commit
bf2c4eea23
1 changed files with 1 additions and 0 deletions
|
|
@ -1240,6 +1240,7 @@ fn read_le_u64_into(src: &[u8], dst: &mut [u64]) {
|
|||
///
|
||||
/// See [here](https://neilmadden.blog/2020/05/28/whats-the-curve25519-clamping-all-about/) for
|
||||
/// more details.
|
||||
#[must_use]
|
||||
pub const fn clamp_integer(mut bytes: [u8; 32]) -> [u8; 32] {
|
||||
bytes[0] &= 0b1111_1000;
|
||||
bytes[31] &= 0b0111_1111;
|
||||
|
|
|
|||
Loading…
Reference in a new issue