Redigera

Dela via


ASF Payload Decryption and Re-encryption

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The steps below describe the actions that an application must complete to decrypt and re-encrypt each payload:

  1. Increment the salt value.
  2. Pass the payload (encrypted with Windows Media DRM) and the salt value to the decryption function, IWMDRMDecrypt::Decrypt, which will return the payload, encrypted using the RC4 public key.
  3. Derive a transitory RC4 key by applying an SHA-1 hash of the initialization vector concatenated with the salt value.
  4. Use your transitory key to decrypt the payload.
  5. Immediately re-encrypt the payload with the authorized content protection scheme according to the Windows Media DRM export compliance and robustness rules.
  6. Locate the next payload.

Exporting Compressed Content