Function encryptKeyTo

  • Encrypt the given content to the given public key. This is RSA encryption, and should be used only to encrypt AES keys.

    Parameters

    • params: {
          key: string | Uint8Array<ArrayBufferLike> | CryptoKey;
          publicKey: string | Uint8Array<ArrayBufferLike> | CryptoKey;
      }

      The content to encrypt, and public key to encrypt it to.

    Returns Promise<Uint8Array>

Methods

Methods

  • Parameters

    • __namedParameters: {
          key: string | Uint8Array<ArrayBufferLike> | CryptoKey;
          publicKey: string | Uint8Array<ArrayBufferLike> | CryptoKey;
      }

    Returns Promise<string>