Method: Ccrypto::Java::ECCPublicKey#to_bin

Defined in:
lib/ccrypto/java/engines/ecc_engine.rb

#to_bin(enc = :bin) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ccrypto/java/engines/ecc_engine.rb', line 21

def to_bin(enc = :bin)
  res = @native_pubKey.encoded
  case enc
  when :b64, :base64
    to_b64(res)
  when :hex
    to_hex(res)
  else
    res
  end
end