std.crypto.p256: fix neg function compile error

There was a typo here and the neg function referenced a non-existent
variable.
This commit is contained in:
Andrew Kelley 2021-06-21 12:40:27 -07:00
parent 2551598013
commit 98b10d94bf

View File

@ -63,8 +63,7 @@ pub fn add(a: CompressedScalar, b: CompressedScalar, endian: builtin.Endian) Non
/// Return -s (mod L)
pub fn neg(s: CompressedScalar, endian: builtin.Endian) NonCanonicalError!CompressedScalar {
_ = s;
return (try Scalar.fromBytes(a, endian)).neg().toBytes(endian);
return (try Scalar.fromBytes(s, endian)).neg().toBytes(endian);
}
/// Return (a-b) (mod L)