@yoshteq/ti365-ts-sdk
    Preparing search index...

    Class MbedTlsCrypto

    Class that exposes mbedTls cryptographic function.

    Index

    Constructors

    Methods

    • Creates Encryption Key by using ECDH-ES (Elliptic Curve Diffie-Hellman Ephemeral Static key agreement). This method supports all curves supported by mbedTls

      Parameters

      • private_key: JsonWebKey
      • public_key: JsonWebKey
      • encryption: "A128GCM" | "A192GCM" | "A256GCM"

        Allowed encryption algorithm from JWA "enc" param.

      • Optionalapu: string

        Agreement PartyUInfo, value contains information about the producer. In base64Url

      • Optionalapv: string

        Agreement PartyVInfo, value contains information about the recipient. In base64Url

      Returns Promise<Uint8Array>

    • Creates a new EC Key

      Parameters

      • curve: EcCurveNames

        Name of the curve, as named in the

      Returns Promise<JsonWebKey>

    • Signs a hash with the given key

      Parameters

      • privateKey: JsonWebKey
      • hash: Uint8Array
      • hashType: HashTypeNames

        Name of the hash type

      Returns Promise<Uint8Array>

    • Tests the hash against the public key & signature.

      Parameters

      Returns Promise<boolean>

      Is signature valid.