Module: RbNaCl::Serializable

Overview

Serialization features shared across all "key-like" classes

Instance Method Summary collapse

Instance Method Details

#inspectString

Inspect this key



16
17
18
# File 'lib/rbnacl/serializable.rb', line 16

def inspect
  "#<#{self.class}:#{Util.bin2hex(to_bytes)[0, 8]}>"
end

#to_sObject



5
6
7
# File 'lib/rbnacl/serializable.rb', line 5

def to_s
  to_bytes
end

#to_strObject



9
10
11
# File 'lib/rbnacl/serializable.rb', line 9

def to_str
  to_bytes
end