Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence committed May 29, 2020
2 parents 9753fe4 + e342f25 commit f04b830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl Scalar {
/// This function is intended for applications like X25519 which
/// require specific bit-patterns when performing scalar
/// multiplication.
pub fn from_bits(bytes: [u8; 32]) -> Scalar {
pub const fn from_bits(bytes: [u8; 32]) -> Scalar {
let mut s = Scalar{bytes};
// Ensure that s < 2^255 by masking the high bit
s.bytes[31] &= 0b0111_1111;
Expand Down

0 comments on commit f04b830

Please sign in to comment.