Function encryptAES128GCMWithPassword

  • Parameters

    • plainText: string | Buffer
    • password: string
    • Optional options: {
          getKey?: ((options: {
              hashLength: number;
              iterations: number;
              memorySize: number;
              parallelism: number;
              password: string;
              salt: Buffer;
          }) => Promise<Buffer>);
          kdf?: KDF;
          kdfparams?: {
              iterations?: number;
              memorySize?: number;
              parallelism?: number;
          };
      }
      • Optional getKey?: ((options: {
            hashLength: number;
            iterations: number;
            memorySize: number;
            parallelism: number;
            password: string;
            salt: Buffer;
        }) => Promise<Buffer>)
          • (options: {
                hashLength: number;
                iterations: number;
                memorySize: number;
                parallelism: number;
                password: string;
                salt: Buffer;
            }): Promise<Buffer>
          • Parameters

            • options: {
                  hashLength: number;
                  iterations: number;
                  memorySize: number;
                  parallelism: number;
                  password: string;
                  salt: Buffer;
              }
              • hashLength: number
              • iterations: number
              • memorySize: number
              • parallelism: number
              • password: string
              • salt: Buffer

            Returns Promise<Buffer>

      • Optional kdf?: KDF
      • Optional kdfparams?: {
            iterations?: number;
            memorySize?: number;
            parallelism?: number;
        }
        • Optional iterations?: number
        • Optional memorySize?: number
        • Optional parallelism?: number

    Returns Promise<EncryptedMessageObject>

Generated using TypeDoc