RSA
Usage Example
import { RSAService } from "https://raw.githubusercontent.com/deno-microfunctions/rsa/main/src/rsa.ts"
const rsaService = new RSAService()
const newRSAKeyPair = rsaService.generateKeyPair()
const message = "Hello World!"
const signature = rsaService.createSignature(message, newRSAKeyPair.privateKey)
const encryptedMessage = rsaService.encrypt(message, newRSAKeyPair.publicKey)
const decryptedmessage = rsaService.decrypt(encryptedMessage, newRSAKeyPair.privateKey)
const isAuthentic = rsaService.validateAuthenticity(decryptedmessage, signature, newRSAKeyPair.publicKey)
Execute Unit tests
deno test src/rsa.spec.ts