class Sodium::Sign::PublicKey

Defined in:

sodium/sign/public_key.cr

Constant Summary

KEY_SIZE = LibSodium.crypto_sign_publickeybytes.to_i
SIG_SIZE = LibSodium.crypto_sign_bytes.to_i

Constructors

Instance Method Summary

Instance methods inherited from module Sodium::Wipe

close close, finalize finalize

Constructor Detail

def self.new(bytes : Bytes) #

Maintains reference to bytes


[View source]

Instance Method Detail

def to_curve25519 : CryptoBox::PublicKey #

[View source]
def to_slice : Bytes #

Returns key


[View source]
def verify(message) : Bytes #

Verify and return a copy of the message data Raises on verification failure.

EXPERIMENTAL


[View source]
def verify_detached(message : Bytes, sig : Bytes) : Nil #

[View source]
def verify_detached(message, sig) : Nil #

Verify signature made by secret_key.sign_detached(message) Raises on verification failure.


[View source]
def verify_string(message) : String #

Verify and return a String with the copied message data Raises on verification failure.

EXPERIMENTAL


[View source]