@li0ard/dstu - v0.2.0
    Preparing search index...

    Function dstu4145Encrypter

    • ECIES schema over DSTU 4145-2002.

      Parameters

      • curve: ECDSA

        Curve to use.

      • hash: CHash<Hash<any>>

        Hash function to use. (Output length must be 32 bytes)

      • withCofactor: boolean = true

        Whether to multiply shared key by curve cofactor (See ECDSA.getSharedSecret)

      • useDstu9311: boolean = false

        Whether to use DSTU 9311:2024 instead of Kalyna-256?

      Returns Readonly<
          {
              decrypt: (
                  secretKeyB: TArg<Uint8Array<ArrayBufferLike>>,
                  publicKeyA: TArg<Uint8Array<ArrayBufferLike>>,
                  encryptedMessage: EncryptedMessage,
              ) => Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
              encrypt: (
                  secretKeyA: TArg<Uint8Array<ArrayBufferLike>>,
                  publicKeyB: TArg<Uint8Array<ArrayBufferLike>>,
                  plaintext: TArg<Uint8Array<ArrayBufferLike>>,
              ) => EncryptedMessage;
          },
      >