Class: ECC::S256Point

Inherits:
Point
  • Object
show all
Defined in:
lib/elliptic-lite/secp256k1.rb

Instance Attribute Summary

Attributes inherited from Point

#x, #y

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Point

#==, [], #_add, #_div, #_mul, #_pow, #_sub, #add, add, #coerce, #curve, #curve?, div, #double, infinity, #infinity?, #initialize, mul, #mul, on_curve?, pow, #require_curve!, sub

Constructor Details

This class inherits a constructor from ECC::Point

Class Method Details

.curveObject



10
# File 'lib/elliptic-lite/secp256k1.rb', line 10

def self.curve() @curve ||= Curve.new( a: 0, b: 7, f: S256Field ); end

Instance Method Details

#inspectObject

change to fixed 64 char hexstring for x/y



12
13
14
15
16
17
18
# File 'lib/elliptic-lite/secp256k1.rb', line 12

def inspect   ## change to fixed 64 char hexstring for x/y
  if infinity?
    "#{self.class.name}(:infinity)"
  else
    "#{self.class.name}(#{'0x%064x' % @x},#{'0x%064x' % @y})"
  end
end