ENHANCED: more extensive type checking in curve25519_scalar_mult/3
This commit is contained in:
@@ -711,6 +711,8 @@ curve25519_scalar_mult(Scalar, Point, Result) :-
|
|||||||
must_be_bytes(ScalarBytes, curve25519_scalar_mult/3),
|
must_be_bytes(ScalarBytes, curve25519_scalar_mult/3),
|
||||||
length(ScalarBytes, 32)
|
length(ScalarBytes, 32)
|
||||||
),
|
),
|
||||||
|
must_be(chars, Point),
|
||||||
|
length(Point, 32),
|
||||||
maplist(char_code, Point, PointBytes),
|
maplist(char_code, Point, PointBytes),
|
||||||
'$curve25519_scalar_mult'(ScalarBytes, PointBytes, Result).
|
'$curve25519_scalar_mult'(ScalarBytes, PointBytes, Result).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user