mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 06:15:21 +00:00
std.crypto.p256.scalar: fe struct member is not a function (#8954)
This commit is contained in:
parent
a23fa896ef
commit
d496400cff
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user