Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RSA

Hierarchy

  • RSA

Index

Methods

Methods

Static decrypt

  • decrypt(encrypted: string, key: PrivateKey): string
  • Parameters

    Returns string

    Decrypted string

Static encrypt

  • encrypt(plain: string, key: PublicKey): string
  • Parameters

    Returns string

    Encrypted string

Static gen

  • gen(size?: number): Promise<KeyPair>
  • Parameters

    • Default value size: number = 2 ** 12

      Number of bits for the key

    Returns Promise<KeyPair>

    Object that contains the key pair

Generated using TypeDoc