Encrypt the given message.

  • Parameters

    • msg: Msg
    • privateKey: CryptoKey
    • publicKey: string | CryptoKey
    • __namedParameters: { format: "raw" }
    • OptionalcharSize: CharSize
    • Optionalcurve: EccCurve
    • Optionalopts: Partial<{ alg: SymmAlg; iv: ArrayBuffer; length: SymmKeyLength }>

    Returns Promise<Uint8Array>

  • Parameters

    • msg: Msg
    • privateKey: CryptoKey
    • publicKey: string | CryptoKey
    • Optional__namedParameters: { format: any }
    • OptionalcharSize: CharSize
    • Optionalcurve: EccCurve
    • Optionalopts: Partial<{ alg: SymmAlg; iv: ArrayBuffer; length: SymmKeyLength }>

    Returns Promise<string>