Class: I2P::PrivateKey
- Defined in:
- lib/i2p/data/private_key.rb,
lib/i2p/sdk.rb
Overview
**I2P private key data structure.**
An I2P private key is a 2048-bit (256-byte) integer. The private key represents only the exponent, not the primes, which are constant and defined in the crypto spec.
Constant Summary collapse
- BYTESIZE =
256
Instance Attribute Summary
Attributes inherited from Key
Instance Method Summary collapse
-
#to_java ⇒ Object
Returns an instance of the Java class ‘net.i2p.data.PrivateKey`.
Methods inherited from Key
#initialize, read, #to_s, #valid?
Methods inherited from Structure
#==, #eql?, parse, read, #size, #to_base64, #to_s
Constructor Details
This class inherits a constructor from I2P::Key
Instance Method Details
#to_java ⇒ Object
Returns an instance of the Java class ‘net.i2p.data.PrivateKey`.
**This method only works with JRuby, not with MRI or YARV.**
43 44 45 |
# File 'lib/i2p/sdk.rb', line 43 def to_java I2P::SDK::PrivateKey.new(to_s.to_java_bytes) end |