Device

class Device(val type: DeviceTypes, val securityLevel: Int, val flags: Map<String, Any?>, val privateKeyDer: ByteArray, val clientId: ClientIdentification, val vmp: FileHashes?, val systemId: Int, val rawFlags: Int = 0)

Kotlin Multiplatform representation of a Widevine Device file (WVD). Supports the v2 structure used by pywidevine; v1 blobs can be brought forward with migrate.

Constructors

Link copied to clipboard
constructor(type: DeviceTypes, securityLevel: Int, flags: Map<String, Any?>, privateKeyDer: ByteArray, clientId: ClientIdentification, vmp: FileHashes?, systemId: Int, rawFlags: Int = 0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val clientId: ClientIdentification
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rawFlags: Int = 0

The raw flags byte, preserved so dumps round-trips. No flags are defined yet, which is why flags is always empty.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val vmp: FileHashes?

Functions

Link copied to clipboard
fun dump(path: String, fileSystem: FileSystem)
fun dump(path: Path, fileSystem: FileSystem)

Write this device to path as a WVD v2 file, creating parent directories.

Link copied to clipboard

Serialize this device back to a WVD v2 blob.

Link copied to clipboard
open override fun toString(): String