@substrate-system/simple-aes
    Preparing search index...

    Function encryptMessage

    • Take a message object, create a new AES key, and encrypt the message with the key. Return encrypted message and the key, encoded as base64url.

      Parameters

      • msg: { content: string }

        The message to encrypt.

      • opts: { length: SymmKeyLength } = ...

      Returns Promise<[{ content: string }, { key: string }]>

      The encrypted message and key.