Skip to main content
Module

x/god_crypto/mod.ts>RSA

Pure Javascript/Typescript Crypto Implementation for Deno. AES, RSA, HMAC, and TOTP
Very Popular
Go to Latest
class RSA
import { RSA } from "https://deno.land/x/god_crypto@v1.4.10/mod.ts";

Constructors

new
RSA(key: RSAKey)

Properties

protected
key: RSAKey

Methods

decrypt(m: Uint8Array, options?: Partial<RSAOption>)
encrypt(m: Uint8Array | string, options?: Partial<RSAOption>)
sign(message: Uint8Array | string, options?: Partial<RSASignOption>): Promise<RawBinary>
verify(
signature: Uint8Array,
message: Uint8Array | string,
options?: Partial<RSASignOption>,
): Promise<boolean>

Static Methods

importKey(key: string | JSONWebKey, format?: "auto" | "jwk" | "pem"): RSAKey

Convert key in an external, portable format to our internal key format

parseKey(key: string | JSONWebKey, format?: "auto" | "jwk" | "pem"): RSAKey