Module: RbNaCl::Serializable
- Included in:
- Boxes::Curve25519XSalsa20Poly1305::PrivateKey, Boxes::Curve25519XSalsa20Poly1305::PublicKey, GroupElements::Curve25519, RbNaCl::Signatures::Ed25519::SigningKey, RbNaCl::Signatures::Ed25519::VerifyKey
- Defined in:
- lib/rbnacl/serializable.rb
Overview
Serialization features shared across all "key-like" classes
Instance Method Summary collapse
-
#inspect ⇒ String
Inspect this key.
- #to_s ⇒ Object
- #to_str ⇒ Object
Instance Method Details
#inspect ⇒ String
Inspect this key
11 12 13 |
# File 'lib/rbnacl/serializable.rb', line 11 def inspect "#<#{self.class}:#{Util.bin2hex(to_bytes)[0,8]}>" end |
#to_s ⇒ Object
5 |
# File 'lib/rbnacl/serializable.rb', line 5 def to_s; to_bytes; end |
#to_str ⇒ Object
6 |
# File 'lib/rbnacl/serializable.rb', line 6 def to_str; to_bytes; end |