std.crypto.p256.scalar: fe struct member is not a function (#8954)

This commit is contained in:
Frank Denis 2021-06-01 11:02:48 +02:00 committed by GitHub
parent a23fa896ef
commit d496400cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,12 +120,12 @@ pub const Scalar = struct {
/// Compute x+y (mod L)
pub fn add(x: Scalar, y: Scalar) Scalar {
return Scalar{ .fe = x.fe().add(y.fe) };
return Scalar{ .fe = x.fe.add(y.fe) };
}
/// Compute x-y (mod L)
pub fn sub(x: Scalar, y: Scalar) Scalar {
return Scalar{ .fe = x.fe().sub(y.fe) };
return Scalar{ .fe = x.fe.sub(y.fe) };
}
/// Compute 2n (mod L)
@ -135,7 +135,7 @@ pub const Scalar = struct {
/// Compute x*y (mod L)
pub fn mul(x: Scalar, y: Scalar) Scalar {
return Scalar{ .fe = x.fe().mul(y.fe) };
return Scalar{ .fe = x.fe.mul(y.fe) };
}
/// Compute x^2 (mod L)