Class: ECDSA::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/ecdsa/ext/point.rb

Overview

Extension of ECDSA::Point class.

Instance Method Summary collapse

Instance Method Details

#to_hex(compression = true) ⇒ String

Convert coordinates to hex string.

Returns:

  • (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_jacobianECDSA::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_projectiveECDSA::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