@dvxch/yandex-music
    Preparing search index...

    Function decryptEncraw

    • Decrypt an encraw (AES-CTR) lossless stream with its hex key.

      The IV is 16 zero bytes (12-byte zero nonce + zero counter); the key length selects AES-128 vs AES-256. Exported for consumers that run their own download pipeline (streaming, progress, custom caching) off LosslessDownloadInfo.urls

      Parameters

      • data: Uint8Array

        The encrypted audio bytes.

      • keyHex: string

        The hex AES-CTR key from /get-file-info.

      Returns Uint8Array

      The decrypted audio bytes.