def self.
new(rsa : Pointer(LibCrypto::RSA))
#
def self.
new(public_key : IO | Nil =
nil, private_key : IO | Nil =
nil)
#
def self.
new(public_key : String | Nil =
nil, private_key : String | Nil =
nil)
#
def
private_decrypt(string : String) : String
#
def
private_encrypt(string : String) : String
#
def
public_decrypt(string : String) : String
#
def
public_encrypt(string : String) : String
#
def
sign(string : String, signature_type =
Signature::SHA256) : String
#
def
sign(bytes : Bytes, signature_type =
Signature::SHA256) : Bytes
#
def
verify?(signed : String, original : String) : Bool
#
def
verify?(signed : Bytes, original : Bytes, signature_type =
Signature::SHA256) : Bool
#