Class: ECDSA::Point
- Inherits:
-
Object
- Object
- ECDSA::Point
- Defined in:
- lib/ecdsa/ext/point.rb
Overview
Extension of ECDSA::Point class.
Instance Method Summary collapse
-
#to_hex(compression = true) ⇒ String
Convert coordinates to hex string.
-
#to_jacobian ⇒ ECDSA::Ext::JacobianPoint
Convert coordinates to projective point.
-
#to_projective ⇒ ECDSA::Ext::ProjectivePoint
Convert coordinates to projective point.
Instance Method Details
#to_hex(compression = true) ⇒ String
Convert coordinates to hex string.
20 21 22 23 24 25 |
# File 'lib/ecdsa/ext/point.rb', line 20 def to_hex(compression = true) # rubocop:disable all ECDSA::Format::PointOctetString.encode( self, compression: compression ).unpack1("H*") end |
#to_jacobian ⇒ ECDSA::Ext::JacobianPoint
Convert coordinates to projective point.
14 15 16 |
# File 'lib/ecdsa/ext/point.rb', line 14 def to_jacobian ECDSA::Ext::JacobianPoint.from_affine(self) end |
#to_projective ⇒ ECDSA::Ext::ProjectivePoint
Convert coordinates to projective point.
8 9 10 |
# File 'lib/ecdsa/ext/point.rb', line 8 def to_projective ECDSA::Ext::ProjectivePoint.from_affine(self) end |