cswidevine 1.6.0

dotnet add package cswidevine --version 1.6.0
                    
NuGet\Install-Package cswidevine -Version 1.6.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="cswidevine" Version="1.6.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="cswidevine" Version="1.6.0" />
                    
Directory.Packages.props
<PackageReference Include="cswidevine" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add cswidevine --version 1.6.0
                    
#r "nuget: cswidevine, 1.6.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package cswidevine@1.6.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=cswidevine&version=1.6.0
                    
Install as a Cake Addin
#tool nuget:?package=cswidevine&version=1.6.0
                    
Install as a Cake Tool

cswidevine

Installation

dotnet add package cswidevine

Usage

An example code snippet:

var device = Device.Load(@"C:/Path/To/A/Provision.wvd");

var cdm = Cdm.FromDevice(device);
var sessionId = cdm.Open();

using var client = new HttpClient();
        
// cdm.SetServiceCertificate(sessionId, [/* binary service certificate */])

var pssh = new Pssh("AAAAW3Bzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAADsIARIQ62dqu8s0Xpa7z2FmMPGj2hoNd2lkZXZpbmVfdGVzdCIQZmtqM2xqYVNkZmFsa3IzaioCSEQyAA==");
var challenge = cdm.GetLicenseChallenge(sessionId, pssh, "STREAMING");

using var content = new ByteArrayContent(challenge);
var response = client.PostAsync("https://cwip-shaka-proxy.appspot.com/no_auth", content).Result;

cdm.ParseLicense(sessionId, response.Content.ReadAsByteArrayAsync().Result);

foreach (var key in cdm.GetKeys(sessionId))
    Console.WriteLine($"[{key.Type}] {key.KeyId.ToHex()}:{key.RawKey.ToHex()}");

cdm.Close(sessionId);

CLI Usage

Compile the program to an exe to use its CLI functions including device creation, testing and remote serving:

dotnet publish -c Release

Disclaimer

  1. This project requires a valid Google-provisioned Private Key and Client Identification blob which are not provided by this project.
  2. Public test provisions are available and provided by Google to use for testing projects such as this one.
  3. License Servers have the ability to block requests from any provision, and are likely already blocking test provisions on production endpoints.
  4. This project does not condone piracy or any action against the terms of the DRM systems.
  5. All efforts in this project have been the result of Reverse-Engineering, Publicly available research, and Trial & Error.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.6.0 167 8/16/2025