Class: TencentTrustsql::IOFormatter::Input
- Inherits:
-
Object
- Object
- TencentTrustsql::IOFormatter::Input
- Defined in:
- lib/tencent_trustsql/i_o_formatter/input.rb
Instance Method Summary collapse
- #localize_private_key(hex_private_key) ⇒ Object
- #localize_public_key(hex_public_key) ⇒ Object
- #localize_sign(der_sign) ⇒ Object
Instance Method Details
#localize_private_key(hex_private_key) ⇒ Object
9 10 11 12 |
# File 'lib/tencent_trustsql/i_o_formatter/input.rb', line 9 def localize_private_key hex_private_key return nil if !hex_private_key Base64.decode64(hex_private_key).unpack('H*').first.hex end |
#localize_public_key(hex_public_key) ⇒ Object
5 6 7 |
# File 'lib/tencent_trustsql/i_o_formatter/input.rb', line 5 def localize_public_key hex_public_key ECDSA::Format::PointOctetString.decode(Base64.decode64(hex_public_key). TencentTrustsql::CURVE) end |
#localize_sign(der_sign) ⇒ Object
14 15 16 17 |
# File 'lib/tencent_trustsql/i_o_formatter/input.rb', line 14 def localize_sign der_sign der_signature = Base64.decode(der_sign) # signature = end |