You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
local _M = {}
|
|
|
|
local rsa = require "rsa"
|
|
|
|
function _M.rsa_encrypt(plainText,pubKey)
|
|
local encrypted= rsa.encrypt(plainText,pubKey)
|
|
return encrypted
|
|
end
|
|
|
|
function _M.rsa_decrypt(b64cipherText,priKey)
|
|
local data= rsa.decrypt(b64cipherText,priKey)
|
|
return data
|
|
end
|
|
|
|
return _M |