class ECDSA::Point
Public Instance Methods
encode(only_x = false)
click to toggle source
Encode this point into a binary string. @param (Boolean) only_x whether or not to encode only X-coordinate. default is false.
# File lib/schnorr/ec_point_ext.rb, line 13 def encode(only_x = false) if only_x ECDSA::Format::FieldElementOctetString.encode(x, group.field) else ECDSA::Format::PointOctetString.encode(self, {compression: true}) end end
has_even_y?()
click to toggle source
Check the y-coordinate of this point is an even. @return (Boolean) if even, return true.
# File lib/schnorr/ec_point_ext.rb, line 7 def has_even_y? y.even? end