class Sodium::Sign::PublicKey
- Sodium::Sign::PublicKey
- Sodium::Key
- Reference
- Object
Defined in:
sodium/sign/public_key.crConstant Summary
-
KEY_SIZE =
LibSodium.crypto_sign_publickeybytes.to_i
-
SIG_SIZE =
LibSodium.crypto_sign_bytes.to_i
Constructors
-
.new(bytes : Bytes)
Maintains reference to bytes
Instance Method Summary
- #to_curve25519 : CryptoBox::PublicKey
-
#to_slice : Bytes
Returns key
-
#verify(message) : Bytes
Verify and return a copy of the message data Raises on verification failure.
EXPERIMENTAL
- #verify_detached(message : Bytes, sig : Bytes) : Nil
-
#verify_detached(message, sig) : Nil
Verify signature made by
secret_key.sign_detached(message)
Raises on verification failure. -
#verify_string(message) : String
Verify and return a String with the copied message data Raises on verification failure.
EXPERIMENTAL
Constructor Detail
Instance Method Detail
def verify(message) : Bytes
#
Verify and return a copy of the message data Raises on verification failure.
EXPERIMENTAL
def verify_detached(message, sig) : Nil
#
Verify signature made by secret_key.sign_detached(message)
Raises on verification failure.
def verify_string(message) : String
#
Verify and return a String with the copied message data Raises on verification failure.
EXPERIMENTAL