okova
Version:
Advanced DRM inspection toolkit
3,519 lines • 140 kB
TypeScript
import { b } from "barsic";
import * as $protobuf from "protobufjs";
import { AffinePoint } from "@noble/curves/abstract/curve.js";
//#region src/lib/decrypt.d.ts
type PsshBox = unknown;
type EncryptionScheme = 'cenc' | 'cens' | 'cbcs';
type SubsampleEncryption = {
clearLen: number;
protectedLen: number;
};
type EncryptionPattern = {
cryptByteBlock: number;
skipByteBlock: number;
};
type EncryptedPacket = {
data: Uint8Array;
keyId: string;
psshBoxes: PsshBox[];
scheme: EncryptionScheme;
iv: Uint8Array;
timestamp: number;
subsamples: SubsampleEncryption[] | null;
pattern: EncryptionPattern | null;
};
declare const decryptPacketWithKey: (packet: EncryptedPacket, keyHex: string) => Promise<Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>>;
declare const decryptPacketWithKeyBytes: (packet: EncryptedPacket, keyBytes: Uint8Array) => Promise<Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>>;
declare const decryptPacketWithKeys: (packet: EncryptedPacket, keys: MediaKeysMap, keyStatuses: Map<string, MediaKeyStatus>) => Promise<Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>>;
//#endregion
//#region src/lib/api.d.ts
type MediaKeySessionId = string;
type MediaKeyId = string;
type MediaKey = string;
type MediaKeysMap = Map<MediaKeyId, MediaKey>;
interface MediaKeyMessageEventInit {
message: Uint8Array<ArrayBuffer>;
messageType: MediaKeyMessageType;
}
interface MediaKeyStatusesChangeEventInit {
keyStatuses: Map<MediaKeyId, MediaKeyStatus>;
keys: MediaKeysMap;
}
interface WaitForKeysOptions {
timeoutMs?: number;
signal?: AbortSignal;
}
interface MediaKeysEngineSession extends EventTarget {
readonly sessionId: MediaKeySessionId;
readonly sessionType: MediaKeySessionType;
readonly keyStatuses: Map<MediaKeyId, MediaKeyStatus>;
readonly keys: MediaKeysMap;
onmessage: ((this: MediaKeysEngineSession, ev: CustomEvent<MediaKeyMessageEventInit>) => any) | null;
onkeyschange: ((this: MediaKeysEngineSession, ev: Event) => any) | null;
onkeystatuseschange: ((this: MediaKeysEngineSession, ev: CustomEvent<MediaKeyStatusesChangeEventInit>) => any) | null;
generateRequest(initData: Uint8Array, /** Default: `cenc` */
initDataType?: 'cenc' | 'webm' | 'keyids' | 'skd' | 'sinf' | string): Promise<void>;
update(response: Uint8Array): Promise<void>;
decrypt(packet: EncryptedPacket): Promise<Uint8Array>;
close(): Promise<void>;
remove?(): Promise<void>;
pause?(): string;
waitForKeys(options?: WaitForKeysOptions): Promise<MediaKeysMap>;
}
interface MediaKeysEngine {
readonly keySystem: string;
getStatusForPolicy(policy?: MediaKeysPolicy): Promise<MediaKeyStatus>;
setServerCertificate(serverCertificate: Uint8Array): Promise<boolean>;
createSession(/** Default: `temporary` */
sessionType?: MediaKeySessionType): Promise<MediaKeysEngineSession> | MediaKeysEngineSession;
resumeSession?(state: string): MediaKeysEngineSession;
}
declare abstract class BaseMediaKeysEngineSession extends EventTarget implements MediaKeysEngineSession {
sessionId: string;
sessionType: MediaKeySessionType;
keyStatuses: Map<MediaKeyId, MediaKeyStatus>;
keys: MediaKeysMap;
onmessage: ((this: MediaKeysEngineSession, ev: CustomEvent<MediaKeyMessageEventInit>) => any) | null;
onkeyschange: ((this: MediaKeysEngineSession, ev: Event) => any) | null;
onkeystatuseschange: ((this: MediaKeysEngineSession, ev: CustomEvent<MediaKeyStatusesChangeEventInit>) => any) | null;
protected constructor(sessionType?: MediaKeySessionType);
abstract generateRequest(initData: Uint8Array, initDataType?: string): Promise<void>;
abstract update(response: Uint8Array): Promise<void>;
abstract close(): Promise<void>;
remove?(): Promise<void>;
pause?(): string;
decrypt(packet: EncryptedPacket): Promise<Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>>;
waitForKeys(options?: WaitForKeysOptions): Promise<MediaKeysMap>;
protected emitMessage(detail: MediaKeyMessageEventInit): void;
protected emitKeysChange(): void;
protected emitKeyStatusesChange(): void;
}
declare abstract class BaseMediaKeysEngine implements MediaKeysEngine {
abstract readonly keySystem: string;
getStatusForPolicy(): Promise<MediaKeyStatus>;
abstract setServerCertificate(serverCertificate: Uint8Array): Promise<boolean>;
abstract createSession(sessionType?: MediaKeySessionType): Promise<MediaKeysEngineSession> | MediaKeysEngineSession;
resumeSession?(state: string): MediaKeysEngineSession;
}
/**
* https://www.w3.org/TR/encrypted-media-2/#mediakeymessageevent
*/
declare class MediaKeyMessageEvent extends Event {
readonly messageType: MediaKeyMessageType;
readonly message: ArrayBuffer;
constructor(messageType: MediaKeyMessageType, message: ArrayBuffer);
}
declare const waitForKeys: (target: EventTarget, getKeys: () => MediaKeysMap, options?: WaitForKeysOptions) => Promise<MediaKeysMap>;
declare class Session extends EventTarget implements MediaKeySession {
#private;
expiration: number;
closed: Promise<MediaKeySessionClosedReason>;
keyStatuses: Map<BufferSource, MediaKeyStatus>;
onmessage: ((this: MediaKeySession, ev: MediaKeyMessageEvent) => any) | null;
onkeyschange: ((this: MediaKeySession, ev: Event) => any) | null;
onkeystatuseschange: ((this: MediaKeySession, ev: Event) => any) | null;
sessionType?: MediaKeySessionType;
engine: MediaKeysEngine;
keys: MediaKeysMap;
initData?: BufferSource | undefined;
initDataType?: string | undefined;
constructor(sessionType: MediaKeySessionType | undefined, engine: MediaKeysEngine, engineSession?: MediaKeysEngineSession | Promise<MediaKeysEngineSession>);
get sessionId(): string;
load(_sessionId: string): Promise<boolean>;
generateRequest(initDataType: string, initData: BufferSource): Promise<void>;
update(response: BufferSource): Promise<void>;
close(): Promise<void>;
remove(): Promise<void>;
waitForLicenseRequest(): Promise<Uint8Array<ArrayBufferLike>>;
waitForKeyStatusesChange(): Promise<MediaKeysMap>;
pause(): string;
resume(state: string): Session;
static resume(state: string, engine: MediaKeysEngine): Session;
}
declare const ALL_ENGINES: MediaKeysEngine[];
declare const setSupportedEngines: (engines: MediaKeysEngine[]) => void;
/**
* https://www.w3.org/TR/encrypted-media-2/#navigator-extension-requestmediakeysystemaccess
*/
declare const requestMediaKeySystemAccess: (keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]) => {
keySystem: string;
createMediaKeys: () => Promise<{
createSession: (sessionType?: MediaKeySessionType) => Session;
setServerCertificate: (serverCertificate: BufferSource) => Promise<boolean>;
getStatusForPolicy: (policy?: MediaKeysPolicy) => Promise<MediaKeyStatus>;
}>;
getConfiguration: () => MediaKeySystemConfiguration;
};
//#endregion
//#region src/lib/utils.d.ts
type Bytes = Uint8Array<ArrayBuffer>;
type BytesLike = BufferSource | Uint8Array<ArrayBufferLike>;
declare const toBytes: (data: BytesLike) => Bytes;
declare const toBufferSource: (data: BytesLike) => BufferSource;
declare const fromText: (data: string) => {
toBase64: () => string;
toHex: () => string;
toBuffer: () => Uint8Array<ArrayBuffer>;
};
declare const fromBinary: (data: string) => {
toBuffer: () => Uint8Array<ArrayBuffer>;
};
declare const fromBase64: (data: string) => {
toBuffer: () => Uint8Array<ArrayBuffer>;
toText: () => string;
toHex: () => string;
};
declare const fromBuffer: (data: Uint8Array) => {
toBase64: () => string;
toHex: () => string;
toText: () => string;
toBinary: () => string;
};
declare const fromHex: (data: string) => {
toBase64: () => string;
toBuffer: () => Uint8Array;
toText: () => string;
};
declare const parseBufferSource: (data: BytesLike) => Bytes;
type Logger = Pick<typeof console, 'debug' | 'error' | 'info' | 'warn'>;
declare class BinaryReader {
offset: number;
length: number;
rawBytes: Uint8Array;
dataView: DataView;
constructor(data: Uint8Array);
readUint8(): number;
readUint16(little?: boolean): number;
readUint32(little?: boolean): number;
readBytes(size: number): Uint8Array<ArrayBufferLike>;
reset(): void;
}
declare const compareArrays: (arr1: Uint8Array, arr2: Uint8Array) => boolean;
declare const bytesToString: (bytes: Uint8Array) => string;
declare const bytesToBase64: (uint8array: Uint8Array) => string;
declare const stringToBytes: (string: string) => Uint8Array<ArrayBuffer>;
declare const base64ToBytes: (base64_string: string) => Uint8Array<ArrayBuffer>;
declare const xorArrays: (arr1: Uint8Array, arr2: Uint8Array) => Uint8Array<ArrayBuffer>;
declare const getRandomBytes: (size: number) => Uint8Array<ArrayBuffer>;
//#endregion
//#region node_modules/.pnpm/long@5.3.2/node_modules/long/types.d.ts
// Common type definitions for both the ESM and UMD variants. The ESM variant
// reexports the Long class as its default export, whereas the UMD variant makes
// the Long class a whole-module export with a global variable fallback.
type LongLike = Long | number | bigint | string | {
low: number;
high: number;
unsigned: boolean;
};
declare class Long {
/**
* Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See the from* functions below for more convenient ways of constructing Longs.
*/
constructor(low: number, high?: number, unsigned?: boolean);
/**
* Maximum unsigned value.
*/
static MAX_UNSIGNED_VALUE: Long;
/**
* Maximum signed value.
*/
static MAX_VALUE: Long;
/**
* Minimum signed value.
*/
static MIN_VALUE: Long;
/**
* Signed negative one.
*/
static NEG_ONE: Long;
/**
* Signed one.
*/
static ONE: Long;
/**
* Unsigned one.
*/
static UONE: Long;
/**
* Unsigned zero.
*/
static UZERO: Long;
/**
* Signed zero
*/
static ZERO: Long;
/**
* The high 32 bits as a signed value.
*/
high: number;
/**
* The low 32 bits as a signed value.
*/
low: number;
/**
* Whether unsigned or not.
*/
unsigned: boolean;
/**
* Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
*/
static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
/**
* Returns a Long representing the given 32 bit integer value.
*/
static fromInt(value: number, unsigned?: boolean): Long;
/**
* Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
*/
static fromNumber(value: number, unsigned?: boolean): Long;
/**
* Returns a Long representing the given big integer value.
*/
static fromBigInt(value: bigint, unsigned?: boolean): Long;
/**
* Returns a Long representation of the given string, written using the specified radix.
*/
static fromString(str: string, unsigned?: boolean | number, radix?: number): Long;
/**
* Creates a Long from its byte representation.
*/
static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
/**
* Creates a Long from its little endian byte representation.
*/
static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
/**
* Creates a Long from its big endian byte representation.
*/
static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
/**
* Tests if the specified object is a Long.
*/
static isLong(obj: any): obj is Long;
/**
* Converts the specified value to a Long.
*/
static fromValue(val: LongLike, unsigned?: boolean): Long;
/**
* Returns the sum of this and the specified Long.
*/
add(addend: LongLike): Long;
/**
* Returns the bitwise AND of this Long and the specified.
*/
and(other: LongLike): Long;
/**
* Compares this Long's value with the specified's.
*/
compare(other: LongLike): number;
/**
* Compares this Long's value with the specified's.
*/
comp(other: LongLike): number;
/**
* Returns this Long divided by the specified.
*/
divide(divisor: LongLike): Long;
/**
* Returns this Long divided by the specified.
*/
div(divisor: LongLike): Long;
/**
* Tests if this Long's value equals the specified's.
*/
equals(other: LongLike): boolean;
/**
* Tests if this Long's value equals the specified's.
*/
eq(other: LongLike): boolean;
/**
* Gets the high 32 bits as a signed integer.
*/
getHighBits(): number;
/**
* Gets the high 32 bits as an unsigned integer.
*/
getHighBitsUnsigned(): number;
/**
* Gets the low 32 bits as a signed integer.
*/
getLowBits(): number;
/**
* Gets the low 32 bits as an unsigned integer.
*/
getLowBitsUnsigned(): number;
/**
* Gets the number of bits needed to represent the absolute value of this Long.
*/
getNumBitsAbs(): number;
/**
* Tests if this Long's value is greater than the specified's.
*/
greaterThan(other: LongLike): boolean;
/**
* Tests if this Long's value is greater than the specified's.
*/
gt(other: LongLike): boolean;
/**
* Tests if this Long's value is greater than or equal the specified's.
*/
greaterThanOrEqual(other: LongLike): boolean;
/**
* Tests if this Long's value is greater than or equal the specified's.
*/
gte(other: LongLike): boolean;
/**
* Tests if this Long's value is greater than or equal the specified's.
*/
ge(other: LongLike): boolean;
/**
* Tests if this Long's value is even.
*/
isEven(): boolean;
/**
* Tests if this Long's value is negative.
*/
isNegative(): boolean;
/**
* Tests if this Long's value is odd.
*/
isOdd(): boolean;
/**
* Tests if this Long's value is positive or zero.
*/
isPositive(): boolean;
/**
* Tests if this Long can be safely represented as a JavaScript number.
*/
isSafeInteger(): boolean;
/**
* Tests if this Long's value equals zero.
*/
isZero(): boolean;
/**
* Tests if this Long's value equals zero.
*/
eqz(): boolean;
/**
* Tests if this Long's value is less than the specified's.
*/
lessThan(other: LongLike): boolean;
/**
* Tests if this Long's value is less than the specified's.
*/
lt(other: LongLike): boolean;
/**
* Tests if this Long's value is less than or equal the specified's.
*/
lessThanOrEqual(other: LongLike): boolean;
/**
* Tests if this Long's value is less than or equal the specified's.
*/
lte(other: LongLike): boolean;
/**
* Tests if this Long's value is less than or equal the specified's.
*/
le(other: LongLike): boolean;
/**
* Returns this Long modulo the specified.
*/
modulo(other: LongLike): Long;
/**
* Returns this Long modulo the specified.
*/
mod(other: LongLike): Long;
/**
* Returns this Long modulo the specified.
*/
rem(other: LongLike): Long;
/**
* Returns the product of this and the specified Long.
*/
multiply(multiplier: LongLike): Long;
/**
* Returns the product of this and the specified Long.
*/
mul(multiplier: LongLike): Long;
/**
* Negates this Long's value.
*/
negate(): Long;
/**
* Negates this Long's value.
*/
neg(): Long;
/**
* Returns the bitwise NOT of this Long.
*/
not(): Long;
/**
* Returns count leading zeros of this Long.
*/
countLeadingZeros(): number;
/**
* Returns count leading zeros of this Long.
*/
clz(): number;
/**
* Returns count trailing zeros of this Long.
*/
countTrailingZeros(): number;
/**
* Returns count trailing zeros of this Long.
*/
ctz(): number;
/**
* Tests if this Long's value differs from the specified's.
*/
notEquals(other: LongLike): boolean;
/**
* Tests if this Long's value differs from the specified's.
*/
neq(other: LongLike): boolean;
/**
* Tests if this Long's value differs from the specified's.
*/
ne(other: LongLike): boolean;
/**
* Returns the bitwise OR of this Long and the specified.
*/
or(other: LongLike): Long;
/**
* Returns this Long with bits shifted to the left by the given amount.
*/
shiftLeft(numBits: number | Long): Long;
/**
* Returns this Long with bits shifted to the left by the given amount.
*/
shl(numBits: number | Long): Long;
/**
* Returns this Long with bits arithmetically shifted to the right by the given amount.
*/
shiftRight(numBits: number | Long): Long;
/**
* Returns this Long with bits arithmetically shifted to the right by the given amount.
*/
shr(numBits: number | Long): Long;
/**
* Returns this Long with bits logically shifted to the right by the given amount.
*/
shiftRightUnsigned(numBits: number | Long): Long;
/**
* Returns this Long with bits logically shifted to the right by the given amount.
*/
shru(numBits: number | Long): Long;
/**
* Returns this Long with bits logically shifted to the right by the given amount.
*/
shr_u(numBits: number | Long): Long;
/**
* Returns this Long with bits rotated to the left by the given amount.
*/
rotateLeft(numBits: number | Long): Long;
/**
* Returns this Long with bits rotated to the left by the given amount.
*/
rotl(numBits: number | Long): Long;
/**
* Returns this Long with bits rotated to the right by the given amount.
*/
rotateRight(numBits: number | Long): Long;
/**
* Returns this Long with bits rotated to the right by the given amount.
*/
rotr(numBits: number | Long): Long;
/**
* Returns the difference of this and the specified Long.
*/
subtract(subtrahend: LongLike): Long;
/**
* Returns the difference of this and the specified Long.
*/
sub(subtrahend: LongLike): Long;
/**
* Converts the Long to a big integer.
*/
toBigInt(): bigint;
/**
* Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.
*/
toInt(): number;
/**
* Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).
*/
toNumber(): number;
/**
* Converts this Long to its byte representation.
*/
toBytes(le?: boolean): number[];
/**
* Converts this Long to its little endian byte representation.
*/
toBytesLE(): number[];
/**
* Converts this Long to its big endian byte representation.
*/
toBytesBE(): number[];
/**
* Converts this Long to signed.
*/
toSigned(): Long;
/**
* Converts the Long to a string written in the specified radix.
*/
toString(radix?: number): string;
/**
* Converts this Long to unsigned.
*/
toUnsigned(): Long;
/**
* Returns the bitwise XOR of this Long and the given one.
*/
xor(other: LongLike): Long;
}
//#endregion
//#region src/lib/widevine/proto/license_protocol.pb.d.ts
/** LicenseType enum. */
declare enum LicenseType {
/** STREAMING value */
STREAMING = 1,
/** OFFLINE value */
OFFLINE = 2,
/** AUTOMATIC value */
AUTOMATIC = 3
}
/** PlatformVerificationStatus enum. */
declare enum PlatformVerificationStatus {
/** PLATFORM_UNVERIFIED value */
PLATFORM_UNVERIFIED = 0,
/** PLATFORM_TAMPERED value */
PLATFORM_TAMPERED = 1,
/** PLATFORM_SOFTWARE_VERIFIED value */
PLATFORM_SOFTWARE_VERIFIED = 2,
/** PLATFORM_HARDWARE_VERIFIED value */
PLATFORM_HARDWARE_VERIFIED = 3,
/** PLATFORM_NO_VERIFICATION value */
PLATFORM_NO_VERIFICATION = 4,
/** PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED value */
PLATFORM_SECURE_STORAGE_SOFTWARE_VERIFIED = 5
}
/** Represents a LicenseIdentification. */
declare class LicenseIdentification {
/**
* Constructs a new LicenseIdentification.
* @param [properties] Properties to set
*/
constructor(properties?: LicenseIdentification.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** LicenseIdentification requestId. */
requestId: Uint8Array;
/** LicenseIdentification sessionId. */
sessionId: Uint8Array;
/** LicenseIdentification purchaseId. */
purchaseId: Uint8Array;
/** LicenseIdentification type. */
type: LicenseType;
/** LicenseIdentification version. */
version: number;
/** LicenseIdentification providerSessionToken. */
providerSessionToken: Uint8Array;
/**
* Creates a new LicenseIdentification instance using the specified properties.
* @param [properties] Properties to set
* @returns LicenseIdentification instance
*/
static create(properties: LicenseIdentification.$Shape): LicenseIdentification & LicenseIdentification.$Shape;
static create(properties?: LicenseIdentification.$Properties): LicenseIdentification;
/**
* Encodes the specified LicenseIdentification message. Does not implicitly {@link LicenseIdentification.verify|verify} messages.
* @param message LicenseIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: LicenseIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified LicenseIdentification message, length delimited. Does not implicitly {@link LicenseIdentification.verify|verify} messages.
* @param message LicenseIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: LicenseIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a LicenseIdentification message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {LicenseIdentification & LicenseIdentification.$Shape} LicenseIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): LicenseIdentification & LicenseIdentification.$Shape;
/**
* Decodes a LicenseIdentification message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {LicenseIdentification & LicenseIdentification.$Shape} LicenseIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): LicenseIdentification & LicenseIdentification.$Shape;
/**
* Verifies a LicenseIdentification message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a LicenseIdentification message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns LicenseIdentification
*/
static fromObject(object: {
[k: string]: any;
}): LicenseIdentification;
/**
* Creates a plain object from a LicenseIdentification message. Also converts values to other types if specified.
* @param message LicenseIdentification
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: LicenseIdentification, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this LicenseIdentification to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for LicenseIdentification
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace LicenseIdentification {
/** Properties of a LicenseIdentification. */
interface $Properties {
/** LicenseIdentification requestId */
requestId?: (Uint8Array | null);
/** LicenseIdentification sessionId */
sessionId?: (Uint8Array | null);
/** LicenseIdentification purchaseId */
purchaseId?: (Uint8Array | null);
/** LicenseIdentification type */
type?: (LicenseType | null);
/** LicenseIdentification version */
version?: (number | null);
/** LicenseIdentification providerSessionToken */
providerSessionToken?: (Uint8Array | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a LicenseIdentification. */
type $Shape = LicenseIdentification.$Properties;
}
/** Represents a License. */
declare class License {
/**
* Constructs a new License.
* @param [properties] Properties to set
*/
constructor(properties?: License.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** License id. */
id?: (LicenseIdentification.$Properties | null);
/** License policy. */
policy?: (License.Policy.$Properties | null);
/** License key. */
key: License.KeyContainer.$Properties[];
/** License licenseStartTime. */
licenseStartTime: (number | Long);
/** License remoteAttestationVerified. */
remoteAttestationVerified: boolean;
/** License providerClientToken. */
providerClientToken: Uint8Array;
/** License protectionScheme. */
protectionScheme: number;
/** License srmRequirement. */
srmRequirement: Uint8Array;
/** License srmUpdate. */
srmUpdate: Uint8Array;
/** License platformVerificationStatus. */
platformVerificationStatus: PlatformVerificationStatus;
/** License groupIds. */
groupIds: Uint8Array[];
/**
* Creates a new License instance using the specified properties.
* @param [properties] Properties to set
* @returns License instance
*/
static create(properties: License.$Shape): License & License.$Shape;
static create(properties?: License.$Properties): License;
/**
* Encodes the specified License message. Does not implicitly {@link License.verify|verify} messages.
* @param message License message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified License message, length delimited. Does not implicitly {@link License.verify|verify} messages.
* @param message License message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a License message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License & License.$Shape} License
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License & License.$Shape;
/**
* Decodes a License message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License & License.$Shape} License
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License & License.$Shape;
/**
* Verifies a License message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a License message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns License
*/
static fromObject(object: {
[k: string]: any;
}): License;
/**
* Creates a plain object from a License message. Also converts values to other types if specified.
* @param message License
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this License to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for License
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace License {
/** Properties of a License. */
interface $Properties {
/** License id */
id?: (LicenseIdentification.$Properties | null);
/** License policy */
policy?: (License.Policy.$Properties | null);
/** License key */
key?: (License.KeyContainer.$Properties[] | null);
/** License licenseStartTime */
licenseStartTime?: (number | Long | null);
/** License remoteAttestationVerified */
remoteAttestationVerified?: (boolean | null);
/** License providerClientToken */
providerClientToken?: (Uint8Array | null);
/** License protectionScheme */
protectionScheme?: (number | null);
/** License srmRequirement */
srmRequirement?: (Uint8Array | null);
/** License srmUpdate */
srmUpdate?: (Uint8Array | null);
/** License platformVerificationStatus */
platformVerificationStatus?: (PlatformVerificationStatus | null);
/** License groupIds */
groupIds?: (Uint8Array[] | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a License. */
type $Shape = License.$Properties;
/**
* Properties of a Policy.
* @deprecated Use License.Policy.$Properties instead.
*/
interface IPolicy extends License.Policy.$Properties {}
/** Represents a Policy. */
class Policy {
/**
* Constructs a new Policy.
* @param [properties] Properties to set
*/
constructor(properties?: License.Policy.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** Policy canPlay. */
canPlay: boolean;
/** Policy canPersist. */
canPersist: boolean;
/** Policy canRenew. */
canRenew: boolean;
/** Policy rentalDurationSeconds. */
rentalDurationSeconds: (number | Long);
/** Policy playbackDurationSeconds. */
playbackDurationSeconds: (number | Long);
/** Policy licenseDurationSeconds. */
licenseDurationSeconds: (number | Long);
/** Policy renewalRecoveryDurationSeconds. */
renewalRecoveryDurationSeconds: (number | Long);
/** Policy renewalServerUrl. */
renewalServerUrl: string;
/** Policy renewalDelaySeconds. */
renewalDelaySeconds: (number | Long);
/** Policy renewalRetryIntervalSeconds. */
renewalRetryIntervalSeconds: (number | Long);
/** Policy renewWithUsage. */
renewWithUsage: boolean;
/** Policy alwaysIncludeClientId. */
alwaysIncludeClientId: boolean;
/** Policy playStartGracePeriodSeconds. */
playStartGracePeriodSeconds: (number | Long);
/** Policy softEnforcePlaybackDuration. */
softEnforcePlaybackDuration: boolean;
/** Policy softEnforceRentalDuration. */
softEnforceRentalDuration: boolean;
/**
* Creates a new Policy instance using the specified properties.
* @param [properties] Properties to set
* @returns Policy instance
*/
static create(properties: License.Policy.$Shape): License.Policy & License.Policy.$Shape;
static create(properties?: License.Policy.$Properties): License.Policy;
/**
* Encodes the specified Policy message. Does not implicitly {@link License.Policy.verify|verify} messages.
* @param message Policy message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.Policy.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Policy message, length delimited. Does not implicitly {@link License.Policy.verify|verify} messages.
* @param message Policy message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.Policy.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Policy message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.Policy & License.Policy.$Shape} Policy
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.Policy & License.Policy.$Shape;
/**
* Decodes a Policy message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.Policy & License.Policy.$Shape} Policy
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.Policy & License.Policy.$Shape;
/**
* Verifies a Policy message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a Policy message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Policy
*/
static fromObject(object: {
[k: string]: any;
}): License.Policy;
/**
* Creates a plain object from a Policy message. Also converts values to other types if specified.
* @param message Policy
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.Policy, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this Policy to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for Policy
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace Policy {
/** Properties of a Policy. */
interface $Properties {
/** Policy canPlay */
canPlay?: (boolean | null);
/** Policy canPersist */
canPersist?: (boolean | null);
/** Policy canRenew */
canRenew?: (boolean | null);
/** Policy rentalDurationSeconds */
rentalDurationSeconds?: (number | Long | null);
/** Policy playbackDurationSeconds */
playbackDurationSeconds?: (number | Long | null);
/** Policy licenseDurationSeconds */
licenseDurationSeconds?: (number | Long | null);
/** Policy renewalRecoveryDurationSeconds */
renewalRecoveryDurationSeconds?: (number | Long | null);
/** Policy renewalServerUrl */
renewalServerUrl?: (string | null);
/** Policy renewalDelaySeconds */
renewalDelaySeconds?: (number | Long | null);
/** Policy renewalRetryIntervalSeconds */
renewalRetryIntervalSeconds?: (number | Long | null);
/** Policy renewWithUsage */
renewWithUsage?: (boolean | null);
/** Policy alwaysIncludeClientId */
alwaysIncludeClientId?: (boolean | null);
/** Policy playStartGracePeriodSeconds */
playStartGracePeriodSeconds?: (number | Long | null);
/** Policy softEnforcePlaybackDuration */
softEnforcePlaybackDuration?: (boolean | null);
/** Policy softEnforceRentalDuration */
softEnforceRentalDuration?: (boolean | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a Policy. */
type $Shape = License.Policy.$Properties;
}
/**
* Properties of a KeyContainer.
* @deprecated Use License.KeyContainer.$Properties instead.
*/
interface IKeyContainer extends License.KeyContainer.$Properties {}
/** Represents a KeyContainer. */
class KeyContainer {
/**
* Constructs a new KeyContainer.
* @param [properties] Properties to set
*/
constructor(properties?: License.KeyContainer.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** KeyContainer id. */
id: Uint8Array;
/** KeyContainer iv. */
iv: Uint8Array;
/** KeyContainer key. */
key: Uint8Array;
/** KeyContainer type. */
type: License.KeyContainer.KeyType;
/** KeyContainer level. */
level: License.KeyContainer.SecurityLevel;
/** KeyContainer requiredProtection. */
requiredProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/** KeyContainer requestedProtection. */
requestedProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/** KeyContainer keyControl. */
keyControl?: (License.KeyContainer.KeyControl.$Properties | null);
/** KeyContainer operatorSessionKeyPermissions. */
operatorSessionKeyPermissions?: (License.KeyContainer.OperatorSessionKeyPermissions.$Properties | null);
/** KeyContainer videoResolutionConstraints. */
videoResolutionConstraints: License.KeyContainer.VideoResolutionConstraint.$Properties[];
/** KeyContainer antiRollbackUsageTable. */
antiRollbackUsageTable: boolean;
/** KeyContainer trackLabel. */
trackLabel: string;
/**
* Creates a new KeyContainer instance using the specified properties.
* @param [properties] Properties to set
* @returns KeyContainer instance
*/
static create(properties: License.KeyContainer.$Shape): License.KeyContainer & License.KeyContainer.$Shape;
static create(properties?: License.KeyContainer.$Properties): License.KeyContainer;
/**
* Encodes the specified KeyContainer message. Does not implicitly {@link License.KeyContainer.verify|verify} messages.
* @param message KeyContainer message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.KeyContainer.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified KeyContainer message, length delimited. Does not implicitly {@link License.KeyContainer.verify|verify} messages.
* @param message KeyContainer message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.KeyContainer.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a KeyContainer message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.KeyContainer & License.KeyContainer.$Shape} KeyContainer
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.KeyContainer & License.KeyContainer.$Shape;
/**
* Decodes a KeyContainer message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.KeyContainer & License.KeyContainer.$Shape} KeyContainer
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.KeyContainer & License.KeyContainer.$Shape;
/**
* Verifies a KeyContainer message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a KeyContainer message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns KeyContainer
*/
static fromObject(object: {
[k: string]: any;
}): License.KeyContainer;
/**
* Creates a plain object from a KeyContainer message. Also converts values to other types if specified.
* @param message KeyContainer
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.KeyContainer, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this KeyContainer to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for KeyContainer
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace KeyContainer {
/** Properties of a KeyContainer. */
interface $Properties {
/** KeyContainer id */
id?: (Uint8Array | null);
/** KeyContainer iv */
iv?: (Uint8Array | null);
/** KeyContainer key */
key?: (Uint8Array | null);
/** KeyContainer type */
type?: (License.KeyContainer.KeyType | null);
/** KeyContainer level */
level?: (License.KeyContainer.SecurityLevel | null);
/** KeyContainer requiredProtection */
requiredProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/** KeyContainer requestedProtection */
requestedProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/** KeyContainer keyControl */
keyControl?: (License.KeyContainer.KeyControl.$Properties | null);
/** KeyContainer operatorSessionKeyPermissions */
operatorSessionKeyPermissions?: (License.KeyContainer.OperatorSessionKeyPermissions.$Properties | null);
/** KeyContainer videoResolutionConstraints */
videoResolutionConstraints?: (License.KeyContainer.VideoResolutionConstraint.$Properties[] | null);
/** KeyContainer antiRollbackUsageTable */
antiRollbackUsageTable?: (boolean | null);
/** KeyContainer trackLabel */
trackLabel?: (string | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a KeyContainer. */
type $Shape = License.KeyContainer.$Properties;
/** KeyType enum. */
enum KeyType {
/** SIGNING value */
SIGNING = 1,
/** CONTENT value */
CONTENT = 2,
/** KEY_CONTROL value */
KEY_CONTROL = 3,
/** OPERATOR_SESSION value */
OPERATOR_SESSION = 4,
/** ENTITLEMENT value */
ENTITLEMENT = 5,
/** OEM_CONTENT value */
OEM_CONTENT = 6
}
/** SecurityLevel enum. */
enum SecurityLevel {
/** SW_SECURE_CRYPTO value */
SW_SECURE_CRYPTO = 1,
/** SW_SECURE_DECODE value */
SW_SECURE_DECODE = 2,
/** HW_SECURE_CRYPTO value */
HW_SECURE_CRYPTO = 3,
/** HW_SECURE_DECODE value */
HW_SECURE_DECODE = 4,
/** HW_SECURE_ALL value */
HW_SECURE_ALL = 5
}
/**
* Properties of a KeyControl.
* @deprecated Use License.KeyContainer.KeyControl.$Properties instead.
*/
interface IKeyControl extends License.KeyContainer.KeyControl.$Properties {}
/** Represents a KeyControl. */
class KeyControl {
/**
* Constructs a new KeyControl.
* @param [properties] Properties to set
*/
constructor(properties?: License.KeyContainer.KeyControl.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** KeyControl keyControlBlock. */
keyControlBlock: Uint8Array;
/** KeyControl iv. */
iv: Uint8Array;
/**
* Creates a new KeyControl instance using the specified properties.
* @param [properties] Properties to set
* @returns KeyControl instance
*/
static create(properties: License.KeyContainer.KeyControl.$Shape): License.KeyContainer.KeyControl & License.KeyContainer.KeyControl.$Shape;
static create(properties?: License.KeyContainer.KeyControl.$Properties): License.KeyContainer.KeyControl;
/**
* Encodes the specified KeyControl message. Does not implicitly {@link License.KeyContainer.KeyControl.verify|verify} messages.
* @param message KeyControl message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.KeyContainer.KeyControl.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified KeyControl message, length delimited. Does not implicitly {@link License.KeyContainer.KeyControl.verify|verify} messages.
* @param message KeyControl message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.KeyContainer.KeyControl.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a KeyControl message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.KeyContainer.KeyControl & License.KeyContainer.KeyControl.$Shape} KeyControl
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.KeyContainer.KeyControl & License.KeyContainer.KeyControl.$Shape;
/**
* Decodes a KeyControl message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.KeyContainer.KeyControl & License.KeyContainer.KeyControl.$Shape} KeyControl
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.KeyContainer.KeyControl & License.KeyContainer.KeyControl.$Shape;
/**
* Verifies a KeyControl message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a KeyControl message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns KeyControl
*/
static fromObject(object: {
[k: string]: any;
}): License.KeyContainer.KeyControl;
/**
* Creates a plain object from a KeyControl message. Also converts values to other types if specified.
* @param message KeyControl
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.KeyContainer.KeyControl, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this KeyControl to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for KeyControl
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace KeyControl {
/** Properties of a KeyControl. */
interface $Properties {
/** KeyControl keyControlBlock */
keyControlBlock?: (Uint8Array | null);
/** KeyControl iv */
iv?: (Uint8Array | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a KeyControl. */
type $Shape = License.KeyContainer.KeyControl.$Properties;
}
/**
* Properties of an OutputProtection.
* @deprecated Use License.KeyContainer.OutputProtection.$Properties instead.
*/
interface IOutputProtection extends License.KeyContainer.OutputProtection.$Properties {}
/** Represents an OutputProtection. */
class OutputProtection {
/**
* Constructs a new OutputProtection.
* @param [properties] Properties to set
*/
constructor(properties?: License.KeyContainer.OutputProtection.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** OutputProtection hdcp. */
hdcp: License.KeyContainer.OutputProtection.HDCP;
/** OutputProtection cgmsFlags. */
cgmsFlags: License.KeyContainer.OutputProtection.CGMS;
/** OutputProtection hdcpSrmRule. */
hdcpSrmRule: License.KeyContainer.OutputProtection.HdcpSrmRule;
/** OutputProtection disableAnalogOutput. */
disableAnalogOutput: boolean;
/** OutputProtection disableDigitalOutput. */
disableDigitalOutput: boolean;
/**
* Creates a new OutputProtection instance using the specified properties.
* @param [properties] Properties to set
* @returns OutputProtection instance
*/
static create(properties: License.KeyContainer.OutputProtection.$Shape): License.KeyContainer.OutputProtection & License.KeyContainer.OutputProtection.$Shape;
static create(properties?: License.KeyContainer.OutputProtection.$Properties): License.KeyContainer.OutputProtection;
/**
* Encodes the specified OutputProtection message. Does not implicitly {@link License.KeyContainer.OutputProtection.verify|verify} messages.
* @param message OutputProtection message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.KeyContainer.OutputProtection.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified OutputProtection message, length delimited. Does not implicitly {@link License.KeyContainer.OutputProtection.verify|verify} messages.
* @param message OutputProtection message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.KeyContainer.OutputProtection.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an OutputProtection message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.KeyContainer.OutputProtection & License.KeyContainer.OutputProtection.$Shape} OutputProtection
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.KeyContainer.OutputProtection & License.KeyContainer.OutputProtection.$Shape;
/**
* Decodes an OutputProtection message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.KeyContainer.OutputProtection & License.KeyContainer.OutputProtection.$Shape} OutputProtection
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.KeyContainer.OutputProtection & License.KeyContainer.OutputProtection.$Shape;
/**
* Verifies an OutputProtection message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates an OutputProtection message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns OutputProtection
*/
static fromObject(object: {
[k: string]: any;
}): License.KeyContainer.OutputProtection;
/**
* Creates a plain object from an OutputProtection message. Also converts values to other types if specified.
* @param message OutputProtection
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.KeyContainer.OutputProtection, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this OutputProtection to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for OutputProtection
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace OutputProtection {
/** Properties of an OutputProtection. */
interface $Properties {
/** OutputProtection hdcp */
hdcp?: (License.KeyContainer.OutputProtection.HDCP | null);
/** OutputProtection cgmsFlags */
cgmsFlags?: (License.KeyContainer.OutputProtection.CGMS | null);
/** OutputProtection hdcpSrmRule */
hdcpSrmRule?: (License.KeyContainer.OutputProtection.HdcpSrmRule | null);
/** OutputProtection disableAnalogOutput */
disableAnalogOutput?: (boolean | null);
/** OutputProtection disableDigitalOutput */
disableDigitalOutput?: (boolean | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of an OutputProtection. */
type $Shape = License.KeyContainer.OutputProtection.$Properties;
/** HDCP enum. */
enum HDCP {
/** HDCP_NONE value */
HDCP_NONE = 0,
/** HDCP_V1 value */
HDCP_V1 = 1,
/** HDCP_V2 value */
HDCP_V2 = 2,
/** HDCP_V2_1 value */
HDCP_V2_1 = 3,
/** HDCP_V2_2 value */
HDCP_V2_2 = 4,
/** HDCP_V2_3 value */
HDCP_V2_3 = 5,
/** HDCP_NO_DIGITAL_OUTPUT value */
HDCP_NO_DIGITAL_OUTPUT = 255
}
/** CGMS enum. */
enum CGMS {
/** CGMS_NONE value */
CGMS_NONE = 42,
/** COPY_FREE value */
COPY_FREE = 0,
/** COPY_ONCE value */
COPY_ONCE = 2,
/** COPY_NEVER value */
COPY_NEVER = 3
}
/** HdcpSrmRule enum. */
enum HdcpSrmRule {
/** HDCP_SRM_RULE_NONE value */
HDCP_SRM_RULE_NONE = 0,
/** CURRENT_SRM value */
CURRENT_SRM = 1
}
}
/**
* Properties of a VideoResolutionConstraint.
* @deprecated Use License.KeyContainer.VideoResolutionConstraint.$Properties instead.
*/
interface IVideoResolutionConstraint extends License.KeyContainer.VideoResolutionConstraint.$Properties {}
/** Represents a VideoResolutionConstraint. */
class VideoResolutionConstraint {
/**
* Constructs a new VideoResolutionConstraint.
* @param [properties] Properties to set
*/
constructor(properties?: License.KeyContainer.VideoResolutionConstraint.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** VideoResolutionConstraint minResolutionPixels. */
minResolutionPixels: number;
/** VideoResolutionConstraint maxResolutionPixels. */
maxResolutionPixels: number;
/** VideoResolutionConstraint requiredProtection. */
requiredProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/**
* Creates a new VideoResolutionConstraint instance using the specified properties.
* @param [properties] Properties to set
* @returns VideoResolutionConstraint instance
*/
static create(properties: License.KeyContainer.VideoResolutionConstraint.$Shape): License.KeyContainer.VideoResolutionConstraint & License.KeyContainer.VideoResolutionConstraint.$Shape;
static create(properties?: License.KeyContainer.VideoResolutionConstraint.$Properties): License.KeyContainer.VideoResolutionConstraint;
/**
* Encodes the specified VideoResolutionConstraint message. Does not implicitly {@link License.KeyContainer.VideoResolutionConstraint.verify|verify} messages.
* @param message VideoResolutionConstraint message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.KeyContainer.VideoResolutionConstraint.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified VideoResolutionConstraint message, length delimited. Does not implicitly {@link License.KeyContainer.VideoResolutionConstraint.verify|verify} messages.
* @param message VideoResolutionConstraint message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.KeyContainer.VideoResolutionConstraint.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a VideoResolutionConstraint message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.KeyContainer.VideoResolutionConstraint & License.KeyContainer.VideoResolutionConstraint.$Shape} VideoResolutionConstraint
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.KeyContainer.VideoResolutionConstraint & License.KeyContainer.VideoResolutionConstraint.$Shape;
/**
* Decodes a VideoResolutionConstraint message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.KeyContainer.VideoResolutionConstraint & License.KeyContainer.VideoResolutionConstraint.$Shape} VideoResolutionConstraint
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.KeyContainer.VideoResolutionConstraint & License.KeyContainer.VideoResolutionConstraint.$Shape;
/**
* Verifies a VideoResolutionConstraint message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a VideoResolutionConstraint message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns VideoResolutionConstraint
*/
static fromObject(object: {
[k: string]: any;
}): License.KeyContainer.VideoResolutionConstraint;
/**
* Creates a plain object from a VideoResolutionConstraint message. Also converts values to other types if specified.
* @param message VideoResolutionConstraint
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.KeyContainer.VideoResolutionConstraint, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this VideoResolutionConstraint to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for VideoResolutionConstraint
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace VideoResolutionConstraint {
/** Properties of a VideoResolutionConstraint. */
interface $Properties {
/** VideoResolutionConstraint minResolutionPixels */
minResolutionPixels?: (number | null);
/** VideoResolutionConstraint maxResolutionPixels */
maxResolutionPixels?: (number | null);
/** VideoResolutionConstraint requiredProtection */
requiredProtection?: (License.KeyContainer.OutputProtection.$Properties | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a VideoResolutionConstraint. */
type $Shape = License.KeyContainer.VideoResolutionConstraint.$Properties;
}
/**
* Properties of an OperatorSessionKeyPermissions.
* @deprecated Use License.KeyContainer.OperatorSessionKeyPermissions.$Properties instead.
*/
interface IOperatorSessionKeyPermissions extends License.KeyContainer.OperatorSessionKeyPermissions.$Properties {}
/** Represents an OperatorSessionKeyPermissions. */
class OperatorSessionKeyPermissions {
/**
* Constructs a new OperatorSessionKeyPermissions.
* @param [properties] Properties to set
*/
constructor(properties?: License.KeyContainer.OperatorSessionKeyPermissions.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** OperatorSessionKeyPermissions allowEncrypt. */
allowEncrypt: boolean;
/** OperatorSessionKeyPermissions allowDecrypt. */
allowDecrypt: boolean;
/** OperatorSessionKeyPermissions allowSign. */
allowSign: boolean;
/** OperatorSessionKeyPermissions allowSignatureVerify. */
allowSignatureVerify: boolean;
/**
* Creates a new OperatorSessionKeyPermissions instance using the specified properties.
* @param [properties] Properties to set
* @returns OperatorSessionKeyPermissions instance
*/
static create(properties: License.KeyContainer.OperatorSessionKeyPermissions.$Shape): License.KeyContainer.OperatorSessionKeyPermissions & License.KeyContainer.OperatorSessionKeyPermissions.$Shape;
static create(properties?: License.KeyContainer.OperatorSessionKeyPermissions.$Properties): License.KeyContainer.OperatorSessionKeyPermissions;
/**
* Encodes the specified OperatorSessionKeyPermissions message. Does not implicitly {@link License.KeyContainer.OperatorSessionKeyPermissions.verify|verify} messages.
* @param message OperatorSessionKeyPermissions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: License.KeyContainer.OperatorSessionKeyPermissions.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified OperatorSessionKeyPermissions message, length delimited. Does not implicitly {@link License.KeyContainer.OperatorSessionKeyPermissions.verify|verify} messages.
* @param message OperatorSessionKeyPermissions message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: License.KeyContainer.OperatorSessionKeyPermissions.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an OperatorSessionKeyPermissions message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {License.KeyContainer.OperatorSessionKeyPermissions & License.KeyContainer.OperatorSessionKeyPermissions.$Shape} OperatorSessionKeyPermissions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): License.KeyContainer.OperatorSessionKeyPermissions & License.KeyContainer.OperatorSessionKeyPermissions.$Shape;
/**
* Decodes an OperatorSessionKeyPermissions message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {License.KeyContainer.OperatorSessionKeyPermissions & License.KeyContainer.OperatorSessionKeyPermissions.$Shape} OperatorSessionKeyPermissions
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): License.KeyContainer.OperatorSessionKeyPermissions & License.KeyContainer.OperatorSessionKeyPermissions.$Shape;
/**
* Verifies an OperatorSessionKeyPermissions message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates an OperatorSessionKeyPermissions message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns OperatorSessionKeyPermissions
*/
static fromObject(object: {
[k: string]: any;
}): License.KeyContainer.OperatorSessionKeyPermissions;
/**
* Creates a plain object from an OperatorSessionKeyPermissions message. Also converts values to other types if specified.
* @param message OperatorSessionKeyPermissions
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: License.KeyContainer.OperatorSessionKeyPermissions, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this OperatorSessionKeyPermissions to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for OperatorSessionKeyPermissions
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace OperatorSessionKeyPermissions {
/** Properties of an OperatorSessionKeyPermissions. */
interface $Properties {
/** OperatorSessionKeyPermissions allowEncrypt */
allowEncrypt?: (boolean | null);
/** OperatorSessionKeyPermissions allowDecrypt */
allowDecrypt?: (boolean | null);
/** OperatorSessionKeyPermissions allowSign */
allowSign?: (boolean | null);
/** OperatorSessionKeyPermissions allowSignatureVerify */
allowSignatureVerify?: (boolean | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of an OperatorSessionKeyPermissions. */
type $Shape = License.KeyContainer.OperatorSessionKeyPermissions.$Properties;
}
}
}
/** HashAlgorithmProto enum. */
declare enum HashAlgorithmProto {
/** HASH_ALGORITHM_UNSPECIFIED value */
HASH_ALGORITHM_UNSPECIFIED = 0,
/** HASH_ALGORITHM_SHA_1 value */
HASH_ALGORITHM_SHA_1 = 1,
/** HASH_ALGORITHM_SHA_256 value */
HASH_ALGORITHM_SHA_256 = 2,
/** HASH_ALGORITHM_SHA_384 value */
HASH_ALGORITHM_SHA_384 = 3
}
/** Represents a ClientIdentification. */
declare class ClientIdentification {
/**
* Constructs a new ClientIdentification.
* @param [properties] Properties to set
*/
constructor(properties?: ClientIdentification.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** ClientIdentification type. */
type: ClientIdentification.TokenType;
/** ClientIdentification token. */
token: Uint8Array;
/** ClientIdentification clientInfo. */
clientInfo: ClientIdentification.NameValue.$Properties[];
/** ClientIdentification providerClientToken. */
providerClientToken: Uint8Array;
/** ClientIdentification licenseCounter. */
licenseCounter: number;
/** ClientIdentification clientCapabilities. */
clientCapabilities?: (ClientIdentification.ClientCapabilities.$Properties | null);
/** ClientIdentification vmpData. */
vmpData: Uint8Array;
/** ClientIdentification deviceCredentials. */
deviceCredentials: ClientIdentification.ClientCredentials.$Properties[];
/**
* Creates a new ClientIdentification instance using the specified properties.
* @param [properties] Properties to set
* @returns ClientIdentification instance
*/
static create(properties: ClientIdentification.$Shape): ClientIdentification & ClientIdentification.$Shape;
static create(properties?: ClientIdentification.$Properties): ClientIdentification;
/**
* Encodes the specified ClientIdentification message. Does not implicitly {@link ClientIdentification.verify|verify} messages.
* @param message ClientIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: ClientIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ClientIdentification message, length delimited. Does not implicitly {@link ClientIdentification.verify|verify} messages.
* @param message ClientIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: ClientIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ClientIdentification message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {ClientIdentification & ClientIdentification.$Shape} ClientIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): ClientIdentification & ClientIdentification.$Shape;
/**
* Decodes a ClientIdentification message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {ClientIdentification & ClientIdentification.$Shape} ClientIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): ClientIdentification & ClientIdentification.$Shape;
/**
* Verifies a ClientIdentification message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a ClientIdentification message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ClientIdentification
*/
static fromObject(object: {
[k: string]: any;
}): ClientIdentification;
/**
* Creates a plain object from a ClientIdentification message. Also converts values to other types if specified.
* @param message ClientIdentification
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: ClientIdentification, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this ClientIdentification to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for ClientIdentification
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace ClientIdentification {
/** Properties of a ClientIdentification. */
interface $Properties {
/** ClientIdentification type */
type?: (ClientIdentification.TokenType | null);
/** ClientIdentification token */
token?: (Uint8Array | null);
/** ClientIdentification clientInfo */
clientInfo?: (ClientIdentification.NameValue.$Properties[] | null);
/** ClientIdentification providerClientToken */
providerClientToken?: (Uint8Array | null);
/** ClientIdentification licenseCounter */
licenseCounter?: (number | null);
/** ClientIdentification clientCapabilities */
clientCapabilities?: (ClientIdentification.ClientCapabilities.$Properties | null);
/** ClientIdentification vmpData */
vmpData?: (Uint8Array | null);
/** ClientIdentification deviceCredentials */
deviceCredentials?: (ClientIdentification.ClientCredentials.$Properties[] | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a ClientIdentification. */
type $Shape = ClientIdentification.$Properties;
/** TokenType enum. */
enum TokenType {
/** KEYBOX value */
KEYBOX = 0,
/** DRM_DEVICE_CERTIFICATE value */
DRM_DEVICE_CERTIFICATE = 1,
/** REMOTE_ATTESTATION_CERTIFICATE value */
REMOTE_ATTESTATION_CERTIFICATE = 2,
/** OEM_DEVICE_CERTIFICATE value */
OEM_DEVICE_CERTIFICATE = 3
}
/**
* Properties of a NameValue.
* @deprecated Use ClientIdentification.NameValue.$Properties instead.
*/
interface INameValue extends ClientIdentification.NameValue.$Properties {}
/** Represents a NameValue. */
class NameValue {
/**
* Constructs a new NameValue.
* @param [properties] Properties to set
*/
constructor(properties?: ClientIdentification.NameValue.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** NameValue name. */
name: string;
/** NameValue value. */
value: string;
/**
* Creates a new NameValue instance using the specified properties.
* @param [properties] Properties to set
* @returns NameValue instance
*/
static create(properties: ClientIdentification.NameValue.$Shape): ClientIdentification.NameValue & ClientIdentification.NameValue.$Shape;
static create(properties?: ClientIdentification.NameValue.$Properties): ClientIdentification.NameValue;
/**
* Encodes the specified NameValue message. Does not implicitly {@link ClientIdentification.NameValue.verify|verify} messages.
* @param message NameValue message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: ClientIdentification.NameValue.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified NameValue message, length delimited. Does not implicitly {@link ClientIdentification.NameValue.verify|verify} messages.
* @param message NameValue message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: ClientIdentification.NameValue.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a NameValue message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {ClientIdentification.NameValue & ClientIdentification.NameValue.$Shape} NameValue
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): ClientIdentification.NameValue & ClientIdentification.NameValue.$Shape;
/**
* Decodes a NameValue message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {ClientIdentification.NameValue & ClientIdentification.NameValue.$Shape} NameValue
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): ClientIdentification.NameValue & ClientIdentification.NameValue.$Shape;
/**
* Verifies a NameValue message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a NameValue message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns NameValue
*/
static fromObject(object: {
[k: string]: any;
}): ClientIdentification.NameValue;
/**
* Creates a plain object from a NameValue message. Also converts values to other types if specified.
* @param message NameValue
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: ClientIdentification.NameValue, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this NameValue to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for NameValue
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace NameValue {
/** Properties of a NameValue. */
interface $Properties {
/** NameValue name */
name?: (string | null);
/** NameValue value */
value?: (string | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a NameValue. */
type $Shape = ClientIdentification.NameValue.$Properties;
}
/**
* Properties of a ClientCapabilities.
* @deprecated Use ClientIdentification.ClientCapabilities.$Properties instead.
*/
interface IClientCapabilities extends ClientIdentification.ClientCapabilities.$Properties {}
/** Represents a ClientCapabilities. */
class ClientCapabilities {
/**
* Constructs a new ClientCapabilities.
* @param [properties] Properties to set
*/
constructor(properties?: ClientIdentification.ClientCapabilities.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** ClientCapabilities clientToken. */
clientToken: boolean;
/** ClientCapabilities sessionToken. */
sessionToken: boolean;
/** ClientCapabilities videoResolutionConstraints. */
videoResolutionConstraints: boolean;
/** ClientCapabilities maxHdcpVersion. */
maxHdcpVersion: ClientIdentification.ClientCapabilities.HdcpVersion;
/** ClientCapabilities oemCryptoApiVersion. */
oemCryptoApiVersion: number;
/** ClientCapabilities antiRollbackUsageTable. */
antiRollbackUsageTable: boolean;
/** ClientCapabilities srmVersion. */
srmVersion: number;
/** ClientCapabilities canUpdateSrm. */
canUpdateSrm: boolean;
/** ClientCapabilities supportedCertificateKeyType. */
supportedCertificateKeyType: ClientIdentification.ClientCapabilities.CertificateKeyType[];
/** ClientCapabilities analogOutputCapabilities. */
analogOutputCapabilities: ClientIdentification.ClientCapabilities.AnalogOutputCapabilities;
/** ClientCapabilities canDisableAnalogOutput. */
canDisableAnalogOutput: boolean;
/** ClientCapabilities resourceRatingTier. */
resourceRatingTier: number;
/**
* Creates a new ClientCapabilities instance using the specified properties.
* @param [properties] Properties to set
* @returns ClientCapabilities instance
*/
static create(properties: ClientIdentification.ClientCapabilities.$Shape): ClientIdentification.ClientCapabilities & ClientIdentification.ClientCapabilities.$Shape;
static create(properties?: ClientIdentification.ClientCapabilities.$Properties): ClientIdentification.ClientCapabilities;
/**
* Encodes the specified ClientCapabilities message. Does not implicitly {@link ClientIdentification.ClientCapabilities.verify|verify} messages.
* @param message ClientCapabilities message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: ClientIdentification.ClientCapabilities.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ClientCapabilities message, length delimited. Does not implicitly {@link ClientIdentification.ClientCapabilities.verify|verify} messages.
* @param message ClientCapabilities message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: ClientIdentification.ClientCapabilities.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ClientCapabilities message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {ClientIdentification.ClientCapabilities & ClientIdentification.ClientCapabilities.$Shape} ClientCapabilities
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): ClientIdentification.ClientCapabilities & ClientIdentification.ClientCapabilities.$Shape;
/**
* Decodes a ClientCapabilities message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {ClientIdentification.ClientCapabilities & ClientIdentification.ClientCapabilities.$Shape} ClientCapabilities
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): ClientIdentification.ClientCapabilities & ClientIdentification.ClientCapabilities.$Shape;
/**
* Verifies a ClientCapabilities message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a ClientCapabilities message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ClientCapabilities
*/
static fromObject(object: {
[k: string]: any;
}): ClientIdentification.ClientCapabilities;
/**
* Creates a plain object from a ClientCapabilities message. Also converts values to other types if specified.
* @param message ClientCapabilities
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: ClientIdentification.ClientCapabilities, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this ClientCapabilities to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for ClientCapabilities
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace ClientCapabilities {
/** Properties of a ClientCapabilities. */
interface $Properties {
/** ClientCapabilities clientToken */
clientToken?: (boolean | null);
/** ClientCapabilities sessionToken */
sessionToken?: (boolean | null);
/** ClientCapabilities videoResolutionConstraints */
videoResolutionConstraints?: (boolean | null);
/** ClientCapabilities maxHdcpVersion */
maxHdcpVersion?: (ClientIdentification.ClientCapabilities.HdcpVersion | null);
/** ClientCapabilities oemCryptoApiVersion */
oemCryptoApiVersion?: (number | null);
/** ClientCapabilities antiRollbackUsageTable */
antiRollbackUsageTable?: (boolean | null);
/** ClientCapabilities srmVersion */
srmVersion?: (number | null);
/** ClientCapabilities canUpdateSrm */
canUpdateSrm?: (boolean | null);
/** ClientCapabilities supportedCertificateKeyType */
supportedCertificateKeyType?: (ClientIdentification.ClientCapabilities.CertificateKeyType[] | null);
/** ClientCapabilities analogOutputCapabilities */
analogOutputCapabilities?: (ClientIdentification.ClientCapabilities.AnalogOutputCapabilities | null);
/** ClientCapabilities canDisableAnalogOutput */
canDisableAnalogOutput?: (boolean | null);
/** ClientCapabilities resourceRatingTier */
resourceRatingTier?: (number | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a ClientCapabilities. */
type $Shape = ClientIdentification.ClientCapabilities.$Properties;
/** HdcpVersion enum. */
enum HdcpVersion {
/** HDCP_NONE value */
HDCP_NONE = 0,
/** HDCP_V1 value */
HDCP_V1 = 1,
/** HDCP_V2 value */
HDCP_V2 = 2,
/** HDCP_V2_1 value */
HDCP_V2_1 = 3,
/** HDCP_V2_2 value */
HDCP_V2_2 = 4,
/** HDCP_V2_3 value */
HDCP_V2_3 = 5,
/** HDCP_NO_DIGITAL_OUTPUT value */
HDCP_NO_DIGITAL_OUTPUT = 255
}
/** CertificateKeyType enum. */
enum CertificateKeyType {
/** RSA_2048 value */
RSA_2048 = 0,
/** RSA_3072 value */
RSA_3072 = 1,
/** ECC_SECP256R1 value */
ECC_SECP256R1 = 2,
/** ECC_SECP384R1 value */
ECC_SECP384R1 = 3,
/** ECC_SECP521R1 value */
ECC_SECP521R1 = 4
}
/** AnalogOutputCapabilities enum. */
enum AnalogOutputCapabilities {
/** ANALOG_OUTPUT_UNKNOWN value */
ANALOG_OUTPUT_UNKNOWN = 0,
/** ANALOG_OUTPUT_NONE value */
ANALOG_OUTPUT_NONE = 1,
/** ANALOG_OUTPUT_SUPPORTED value */
ANALOG_OUTPUT_SUPPORTED = 2,
/** ANALOG_OUTPUT_SUPPORTS_CGMS_A value */
ANALOG_OUTPUT_SUPPORTS_CGMS_A = 3
}
}
/**
* Properties of a ClientCredentials.
* @deprecated Use ClientIdentification.ClientCredentials.$Properties instead.
*/
interface IClientCredentials extends ClientIdentification.ClientCredentials.$Properties {}
/** Represents a ClientCredentials. */
class ClientCredentials {
/**
* Constructs a new ClientCredentials.
* @param [properties] Properties to set
*/
constructor(properties?: ClientIdentification.ClientCredentials.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** ClientCredentials type. */
type: ClientIdentification.TokenType;
/** ClientCredentials token. */
token: Uint8Array;
/**
* Creates a new ClientCredentials instance using the specified properties.
* @param [properties] Properties to set
* @returns ClientCredentials instance
*/
static create(properties: ClientIdentification.ClientCredentials.$Shape): ClientIdentification.ClientCredentials & ClientIdentification.ClientCredentials.$Shape;
static create(properties?: ClientIdentification.ClientCredentials.$Properties): ClientIdentification.ClientCredentials;
/**
* Encodes the specified ClientCredentials message. Does not implicitly {@link ClientIdentification.ClientCredentials.verify|verify} messages.
* @param message ClientCredentials message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: ClientIdentification.ClientCredentials.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified ClientCredentials message, length delimited. Does not implicitly {@link ClientIdentification.ClientCredentials.verify|verify} messages.
* @param message ClientCredentials message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: ClientIdentification.ClientCredentials.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a ClientCredentials message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {ClientIdentification.ClientCredentials & ClientIdentification.ClientCredentials.$Shape} ClientCredentials
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): ClientIdentification.ClientCredentials & ClientIdentification.ClientCredentials.$Shape;
/**
* Decodes a ClientCredentials message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {ClientIdentification.ClientCredentials & ClientIdentification.ClientCredentials.$Shape} ClientCredentials
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): ClientIdentification.ClientCredentials & ClientIdentification.ClientCredentials.$Shape;
/**
* Verifies a ClientCredentials message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a ClientCredentials message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns ClientCredentials
*/
static fromObject(object: {
[k: string]: any;
}): ClientIdentification.ClientCredentials;
/**
* Creates a plain object from a ClientCredentials message. Also converts values to other types if specified.
* @param message ClientCredentials
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: ClientIdentification.ClientCredentials, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this ClientCredentials to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for ClientCredentials
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace ClientCredentials {
/** Properties of a ClientCredentials. */
interface $Properties {
/** ClientCredentials type */
type?: (ClientIdentification.TokenType | null);
/** ClientCredentials token */
token?: (Uint8Array | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a ClientCredentials. */
type $Shape = ClientIdentification.ClientCredentials.$Properties;
}
}
/** Represents an EncryptedClientIdentification. */
declare class EncryptedClientIdentification {
/**
* Constructs a new EncryptedClientIdentification.
* @param [properties] Properties to set
*/
constructor(properties?: EncryptedClientIdentification.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** EncryptedClientIdentification providerId. */
providerId: string;
/** EncryptedClientIdentification serviceCertificateSerialNumber. */
serviceCertificateSerialNumber: Uint8Array;
/** EncryptedClientIdentification encryptedClientId. */
encryptedClientId: Uint8Array;
/** EncryptedClientIdentification encryptedClientIdIv. */
encryptedClientIdIv: Uint8Array;
/** EncryptedClientIdentification encryptedPrivacyKey. */
encryptedPrivacyKey: Uint8Array;
/**
* Creates a new EncryptedClientIdentification instance using the specified properties.
* @param [properties] Properties to set
* @returns EncryptedClientIdentification instance
*/
static create(properties: EncryptedClientIdentification.$Shape): EncryptedClientIdentification & EncryptedClientIdentification.$Shape;
static create(properties?: EncryptedClientIdentification.$Properties): EncryptedClientIdentification;
/**
* Encodes the specified EncryptedClientIdentification message. Does not implicitly {@link EncryptedClientIdentification.verify|verify} messages.
* @param message EncryptedClientIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: EncryptedClientIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified EncryptedClientIdentification message, length delimited. Does not implicitly {@link EncryptedClientIdentification.verify|verify} messages.
* @param message EncryptedClientIdentification message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: EncryptedClientIdentification.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an EncryptedClientIdentification message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {EncryptedClientIdentification & EncryptedClientIdentification.$Shape} EncryptedClientIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): EncryptedClientIdentification & EncryptedClientIdentification.$Shape;
/**
* Decodes an EncryptedClientIdentification message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {EncryptedClientIdentification & EncryptedClientIdentification.$Shape} EncryptedClientIdentification
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): EncryptedClientIdentification & EncryptedClientIdentification.$Shape;
/**
* Verifies an EncryptedClientIdentification message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates an EncryptedClientIdentification message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns EncryptedClientIdentification
*/
static fromObject(object: {
[k: string]: any;
}): EncryptedClientIdentification;
/**
* Creates a plain object from an EncryptedClientIdentification message. Also converts values to other types if specified.
* @param message EncryptedClientIdentification
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: EncryptedClientIdentification, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this EncryptedClientIdentification to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for EncryptedClientIdentification
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace EncryptedClientIdentification {
/** Properties of an EncryptedClientIdentification. */
interface $Properties {
/** EncryptedClientIdentification providerId */
providerId?: (string | null);
/** EncryptedClientIdentification serviceCertificateSerialNumber */
serviceCertificateSerialNumber?: (Uint8Array | null);
/** EncryptedClientIdentification encryptedClientId */
encryptedClientId?: (Uint8Array | null);
/** EncryptedClientIdentification encryptedClientIdIv */
encryptedClientIdIv?: (Uint8Array | null);
/** EncryptedClientIdentification encryptedPrivacyKey */
encryptedPrivacyKey?: (Uint8Array | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of an EncryptedClientIdentification. */
type $Shape = EncryptedClientIdentification.$Properties;
}
/** Represents a DrmCertificate. */
declare class DrmCertificate {
/**
* Constructs a new DrmCertificate.
* @param [properties] Properties to set
*/
constructor(properties?: DrmCertificate.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** DrmCertificate type. */
type: DrmCertificate.Type;
/** DrmCertificate serialNumber. */
serialNumber: Uint8Array;
/** DrmCertificate creationTimeSeconds. */
creationTimeSeconds: number;
/** DrmCertificate expirationTimeSeconds. */
expirationTimeSeconds: number;
/** DrmCertificate publicKey. */
publicKey: Uint8Array;
/** DrmCertificate systemId. */
systemId: number;
/** DrmCertificate testDeviceDeprecated. */
testDeviceDeprecated: boolean;
/** DrmCertificate providerId. */
providerId: string;
/** DrmCertificate serviceTypes. */
serviceTypes: DrmCertificate.ServiceType[];
/** DrmCertificate algorithm. */
algorithm: DrmCertificate.Algorithm;
/** DrmCertificate rotId. */
rotId: Uint8Array;
/** DrmCertificate encryptionKey. */
encryptionKey?: (DrmCertificate.EncryptionKey.$Properties | null);
/**
* Creates a new DrmCertificate instance using the specified properties.
* @param [properties] Properties to set
* @returns DrmCertificate instance
*/
static create(properties: DrmCertificate.$Shape): DrmCertificate & DrmCertificate.$Shape;
static create(properties?: DrmCertificate.$Properties): DrmCertificate;
/**
* Encodes the specified DrmCertificate message. Does not implicitly {@link DrmCertificate.verify|verify} messages.
* @param message DrmCertificate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: DrmCertificate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified DrmCertificate message, length delimited. Does not implicitly {@link DrmCertificate.verify|verify} messages.
* @param message DrmCertificate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: DrmCertificate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a DrmCertificate message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {DrmCertificate & DrmCertificate.$Shape} DrmCertificate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): DrmCertificate & DrmCertificate.$Shape;
/**
* Decodes a DrmCertificate message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {DrmCertificate & DrmCertificate.$Shape} DrmCertificate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): DrmCertificate & DrmCertificate.$Shape;
/**
* Verifies a DrmCertificate message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a DrmCertificate message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns DrmCertificate
*/
static fromObject(object: {
[k: string]: any;
}): DrmCertificate;
/**
* Creates a plain object from a DrmCertificate message. Also converts values to other types if specified.
* @param message DrmCertificate
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: DrmCertificate, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this DrmCertificate to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for DrmCertificate
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace DrmCertificate {
/** Properties of a DrmCertificate. */
interface $Properties {
/** DrmCertificate type */
type?: (DrmCertificate.Type | null);
/** DrmCertificate serialNumber */
serialNumber?: (Uint8Array | null);
/** DrmCertificate creationTimeSeconds */
creationTimeSeconds?: (number | null);
/** DrmCertificate expirationTimeSeconds */
expirationTimeSeconds?: (number | null);
/** DrmCertificate publicKey */
publicKey?: (Uint8Array | null);
/** DrmCertificate systemId */
systemId?: (number | null);
/** DrmCertificate testDeviceDeprecated */
testDeviceDeprecated?: (boolean | null);
/** DrmCertificate providerId */
providerId?: (string | null);
/** DrmCertificate serviceTypes */
serviceTypes?: (DrmCertificate.ServiceType[] | null);
/** DrmCertificate algorithm */
algorithm?: (DrmCertificate.Algorithm | null);
/** DrmCertificate rotId */
rotId?: (Uint8Array | null);
/** DrmCertificate encryptionKey */
encryptionKey?: (DrmCertificate.EncryptionKey.$Properties | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a DrmCertificate. */
type $Shape = DrmCertificate.$Properties;
/** Type enum. */
enum Type {
/** ROOT value */
ROOT = 0,
/** DEVICE_MODEL value */
DEVICE_MODEL = 1,
/** DEVICE value */
DEVICE = 2,
/** SERVICE value */
SERVICE = 3,
/** PROVISIONER value */
PROVISIONER = 4
}
/** ServiceType enum. */
enum ServiceType {
/** UNKNOWN_SERVICE_TYPE value */
UNKNOWN_SERVICE_TYPE = 0,
/** LICENSE_SERVER_SDK value */
LICENSE_SERVER_SDK = 1,
/** LICENSE_SERVER_PROXY_SDK value */
LICENSE_SERVER_PROXY_SDK = 2,
/** PROVISIONING_SDK value */
PROVISIONING_SDK = 3,
/** CAS_PROXY_SDK value */
CAS_PROXY_SDK = 4
}
/** Algorithm enum. */
enum Algorithm {
/** UNKNOWN_ALGORITHM value */
UNKNOWN_ALGORITHM = 0,
/** RSA value */
RSA = 1,
/** ECC_SECP256R1 value */
ECC_SECP256R1 = 2,
/** ECC_SECP384R1 value */
ECC_SECP384R1 = 3,
/** ECC_SECP521R1 value */
ECC_SECP521R1 = 4
}
/**
* Properties of an EncryptionKey.
* @deprecated Use DrmCertificate.EncryptionKey.$Properties instead.
*/
interface IEncryptionKey extends DrmCertificate.EncryptionKey.$Properties {}
/** Represents an EncryptionKey. */
class EncryptionKey {
/**
* Constructs a new EncryptionKey.
* @param [properties] Properties to set
*/
constructor(properties?: DrmCertificate.EncryptionKey.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** EncryptionKey publicKey. */
publicKey: Uint8Array;
/** EncryptionKey algorithm. */
algorithm: DrmCertificate.Algorithm;
/**
* Creates a new EncryptionKey instance using the specified properties.
* @param [properties] Properties to set
* @returns EncryptionKey instance
*/
static create(properties: DrmCertificate.EncryptionKey.$Shape): DrmCertificate.EncryptionKey & DrmCertificate.EncryptionKey.$Shape;
static create(properties?: DrmCertificate.EncryptionKey.$Properties): DrmCertificate.EncryptionKey;
/**
* Encodes the specified EncryptionKey message. Does not implicitly {@link DrmCertificate.EncryptionKey.verify|verify} messages.
* @param message EncryptionKey message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: DrmCertificate.EncryptionKey.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified EncryptionKey message, length delimited. Does not implicitly {@link DrmCertificate.EncryptionKey.verify|verify} messages.
* @param message EncryptionKey message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: DrmCertificate.EncryptionKey.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes an EncryptionKey message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {DrmCertificate.EncryptionKey & DrmCertificate.EncryptionKey.$Shape} EncryptionKey
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): DrmCertificate.EncryptionKey & DrmCertificate.EncryptionKey.$Shape;
/**
* Decodes an EncryptionKey message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {DrmCertificate.EncryptionKey & DrmCertificate.EncryptionKey.$Shape} EncryptionKey
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): DrmCertificate.EncryptionKey & DrmCertificate.EncryptionKey.$Shape;
/**
* Verifies an EncryptionKey message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates an EncryptionKey message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns EncryptionKey
*/
static fromObject(object: {
[k: string]: any;
}): DrmCertificate.EncryptionKey;
/**
* Creates a plain object from an EncryptionKey message. Also converts values to other types if specified.
* @param message EncryptionKey
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: DrmCertificate.EncryptionKey, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this EncryptionKey to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for EncryptionKey
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace EncryptionKey {
/** Properties of an EncryptionKey. */
interface $Properties {
/** EncryptionKey publicKey */
publicKey?: (Uint8Array | null);
/** EncryptionKey algorithm */
algorithm?: (DrmCertificate.Algorithm | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of an EncryptionKey. */
type $Shape = DrmCertificate.EncryptionKey.$Properties;
}
}
/** Represents a SignedDrmCertificate. */
declare class SignedDrmCertificate {
/**
* Constructs a new SignedDrmCertificate.
* @param [properties] Properties to set
*/
constructor(properties?: SignedDrmCertificate.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** SignedDrmCertificate drmCertificate. */
drmCertificate: Uint8Array;
/** SignedDrmCertificate signature. */
signature: Uint8Array;
/** SignedDrmCertificate signer. */
signer?: (SignedDrmCertificate.$Properties | null);
/** SignedDrmCertificate hashAlgorithm. */
hashAlgorithm: HashAlgorithmProto;
/**
* Creates a new SignedDrmCertificate instance using the specified properties.
* @param [properties] Properties to set
* @returns SignedDrmCertificate instance
*/
static create(properties: SignedDrmCertificate.$Shape): SignedDrmCertificate & SignedDrmCertificate.$Shape;
static create(properties?: SignedDrmCertificate.$Properties): SignedDrmCertificate;
/**
* Encodes the specified SignedDrmCertificate message. Does not implicitly {@link SignedDrmCertificate.verify|verify} messages.
* @param message SignedDrmCertificate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: SignedDrmCertificate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified SignedDrmCertificate message, length delimited. Does not implicitly {@link SignedDrmCertificate.verify|verify} messages.
* @param message SignedDrmCertificate message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: SignedDrmCertificate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a SignedDrmCertificate message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {SignedDrmCertificate & SignedDrmCertificate.$Shape} SignedDrmCertificate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): SignedDrmCertificate & SignedDrmCertificate.$Shape;
/**
* Decodes a SignedDrmCertificate message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {SignedDrmCertificate & SignedDrmCertificate.$Shape} SignedDrmCertificate
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): SignedDrmCertificate & SignedDrmCertificate.$Shape;
/**
* Verifies a SignedDrmCertificate message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a SignedDrmCertificate message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns SignedDrmCertificate
*/
static fromObject(object: {
[k: string]: any;
}): SignedDrmCertificate;
/**
* Creates a plain object from a SignedDrmCertificate message. Also converts values to other types if specified.
* @param message SignedDrmCertificate
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: SignedDrmCertificate, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this SignedDrmCertificate to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for SignedDrmCertificate
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace SignedDrmCertificate {
/** Properties of a SignedDrmCertificate. */
interface $Properties {
/** SignedDrmCertificate drmCertificate */
drmCertificate?: (Uint8Array | null);
/** SignedDrmCertificate signature */
signature?: (Uint8Array | null);
/** SignedDrmCertificate signer */
signer?: (SignedDrmCertificate.$Properties | null);
/** SignedDrmCertificate hashAlgorithm */
hashAlgorithm?: (HashAlgorithmProto | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a SignedDrmCertificate. */
type $Shape = SignedDrmCertificate.$Properties;
}
/** Represents a FileHashes. */
declare class FileHashes {
/**
* Constructs a new FileHashes.
* @param [properties] Properties to set
*/
constructor(properties?: FileHashes.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** FileHashes signer. */
signer: Uint8Array;
/** FileHashes signatures. */
signatures: FileHashes.Signature.$Properties[];
/**
* Creates a new FileHashes instance using the specified properties.
* @param [properties] Properties to set
* @returns FileHashes instance
*/
static create(properties: FileHashes.$Shape): FileHashes & FileHashes.$Shape;
static create(properties?: FileHashes.$Properties): FileHashes;
/**
* Encodes the specified FileHashes message. Does not implicitly {@link FileHashes.verify|verify} messages.
* @param message FileHashes message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: FileHashes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified FileHashes message, length delimited. Does not implicitly {@link FileHashes.verify|verify} messages.
* @param message FileHashes message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: FileHashes.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a FileHashes message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {FileHashes & FileHashes.$Shape} FileHashes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): FileHashes & FileHashes.$Shape;
/**
* Decodes a FileHashes message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {FileHashes & FileHashes.$Shape} FileHashes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): FileHashes & FileHashes.$Shape;
/**
* Verifies a FileHashes message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a FileHashes message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns FileHashes
*/
static fromObject(object: {
[k: string]: any;
}): FileHashes;
/**
* Creates a plain object from a FileHashes message. Also converts values to other types if specified.
* @param message FileHashes
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: FileHashes, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this FileHashes to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for FileHashes
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
declare namespace FileHashes {
/** Properties of a FileHashes. */
interface $Properties {
/** FileHashes signer */
signer?: (Uint8Array | null);
/** FileHashes signatures */
signatures?: (FileHashes.Signature.$Properties[] | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a FileHashes. */
type $Shape = FileHashes.$Properties;
/**
* Properties of a Signature.
* @deprecated Use FileHashes.Signature.$Properties instead.
*/
interface ISignature extends FileHashes.Signature.$Properties {}
/** Represents a Signature. */
class Signature {
/**
* Constructs a new Signature.
* @param [properties] Properties to set
*/
constructor(properties?: FileHashes.Signature.$Properties);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
/** Signature filename. */
filename: string;
/** Signature testSigning. */
testSigning: boolean;
/** Signature SHA512Hash. */
SHA512Hash: Uint8Array;
/** Signature mainExe. */
mainExe: boolean;
/** Signature signature. */
signature: Uint8Array;
/**
* Creates a new Signature instance using the specified properties.
* @param [properties] Properties to set
* @returns Signature instance
*/
static create(properties: FileHashes.Signature.$Shape): FileHashes.Signature & FileHashes.Signature.$Shape;
static create(properties?: FileHashes.Signature.$Properties): FileHashes.Signature;
/**
* Encodes the specified Signature message. Does not implicitly {@link FileHashes.Signature.verify|verify} messages.
* @param message Signature message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encode(message: FileHashes.Signature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Encodes the specified Signature message, length delimited. Does not implicitly {@link FileHashes.Signature.verify|verify} messages.
* @param message Signature message or plain object to encode
* @param [writer] Writer to encode to
* @returns Writer
*/
static encodeDelimited(message: FileHashes.Signature.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
/**
* Decodes a Signature message from the specified reader or buffer.
* @param reader Reader or buffer to decode from
* @param [length] Message length if known beforehand
* @returns {FileHashes.Signature & FileHashes.Signature.$Shape} Signature
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decode(reader: ($protobuf.Reader | Uint8Array), length?: number): FileHashes.Signature & FileHashes.Signature.$Shape;
/**
* Decodes a Signature message from the specified reader or buffer, length delimited.
* @param reader Reader or buffer to decode from
* @returns {FileHashes.Signature & FileHashes.Signature.$Shape} Signature
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
static decodeDelimited(reader: ($protobuf.Reader | Uint8Array)): FileHashes.Signature & FileHashes.Signature.$Shape;
/**
* Verifies a Signature message.
* @param message Plain object to verify
* @returns `null` if valid, otherwise the reason why it is not
*/
static verify(message: {
[k: string]: any;
}): (string | null);
/**
* Creates a Signature message from a plain object. Also converts values to their respective internal types.
* @param object Plain object
* @returns Signature
*/
static fromObject(object: {
[k: string]: any;
}): FileHashes.Signature;
/**
* Creates a plain object from a Signature message. Also converts values to other types if specified.
* @param message Signature
* @param [options] Conversion options
* @returns Plain object
*/
static toObject(message: FileHashes.Signature, options?: $protobuf.IConversionOptions): {
[k: string]: any;
};
/**
* Converts this Signature to JSON.
* @returns JSON object
*/
toJSON(): {
[k: string]: any;
};
/**
* Gets the type url for Signature
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
* @returns The type url
*/
static getTypeUrl(prefix?: string): string;
}
namespace Signature {
/** Properties of a Signature. */
interface $Properties {
/** Signature filename */
filename?: (string | null);
/** Signature testSigning */
testSigning?: (boolean | null);
/** Signature SHA512Hash */
SHA512Hash?: (Uint8Array | null);
/** Signature mainExe */
mainExe?: (boolean | null);
/** Signature signature */
signature?: (Uint8Array | null);
/** Unknown fields preserved while decoding */
$unknowns?: Uint8Array[];
}
/** Shape of a Signature. */
type $Shape = FileHashes.Signature.$Properties;
}
}
//#endregion
//#region src/lib/widevine/device-credentials.d.ts
declare const CLIENT_TYPE: {
readonly android: "android";
readonly chrome: "chrome";
};
type ClientType = (typeof CLIENT_TYPE)[keyof typeof CLIENT_TYPE];
type SecurityLevel = 1 | 2 | 3;
declare class WidevineDeviceCredentials {
#private;
id: ClientIdentification;
type: ClientType;
securityLevel: SecurityLevel;
signedDrmCertificate: SignedDrmCertificate;
drmCertificate: DrmCertificate;
systemId: number;
vmp: FileHashes | null;
info: Map<string, string>;
static from(payload: {
wvd: Uint8Array;
} | {
id: Uint8Array;
key: Uint8Array;
}): Promise<WidevineDeviceCredentials>;
static fromPacked(data: Uint8Array, format?: 'wvd'): Promise<WidevineDeviceCredentials>;
static fromUnpacked(id: Uint8Array, key: Uint8Array, vmp?: Uint8Array): Promise<WidevineDeviceCredentials>;
get key(): {
forDecrypt: CryptoKey;
forSign: CryptoKey;
};
constructor(id: Uint8Array | ClientIdentification, type?: ClientType, securityLevel?: SecurityLevel);
getName(): string;
get filename(): string;
get label(): string;
unpack(): Promise<{
device_client_id_blob: Uint8Array<ArrayBufferLike>;
device_private_key: Uint8Array<ArrayBuffer>;
}>;
pack(format?: 'wvd'): Promise<Uint8Array<ArrayBuffer>>;
importKey(pkcs1: Uint8Array | string): Promise<{
forDecrypt: CryptoKey;
forSign: CryptoKey;
}>;
exportKey(): Promise<Uint8Array<ArrayBuffer>>;
decryptWithKey(data: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
signWithKey(data: Uint8Array): Promise<Uint8Array<ArrayBuffer>>;
encryptId(certificate: SignedDrmCertificate): Promise<EncryptedClientIdentification & EncryptedClientIdentification.$Properties>;
toString(): string;
/**
* https://www.w3.org/TR/encrypted-media-2/#navigator-extension-requestmediakeysystemaccess
*/
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): {
keySystem: string;
createMediaKeys: () => Promise<{
createSession: (sessionType?: MediaKeySessionType) => Session;
setServerCertificate: (serverCertificate: BufferSource) => Promise<boolean>;
getStatusForPolicy: (policy?: MediaKeysPolicy) => Promise<MediaKeyStatus>;
}>;
getConfiguration: () => MediaKeySystemConfiguration;
};
}
//#endregion
//#region src/lib/widevine/key.d.ts
declare class Key {
id: string;
value: string;
type: string;
level?: string;
trackLabel?: string;
permissions: string[];
constructor(id: string, value: string, type?: string, level?: string, trackLabel?: string, permissions?: string[]);
toString(): string;
static fromContainer(container: License.IKeyContainer, encKey: Uint8Array): Promise<Key>;
}
//#endregion
//#region src/lib/widevine/session.d.ts
declare const SESSION_TYPES: {
readonly temporary: 0;
readonly 'persistent-license': 1;
};
type SessionType = keyof typeof SESSION_TYPES;
type ServiceCertificateProvider = () => SignedDrmCertificate | undefined;
declare class WidevineSession extends BaseMediaKeysEngineSession {
#private;
sessionId: string;
expiration: number;
closed: Promise<MediaKeySessionClosedReason>;
sessionType: SessionType;
deviceCredentials: WidevineDeviceCredentials;
sessionNumber: number;
initData?: Uint8Array;
initDataType?: string;
serviceCertificate?: SignedDrmCertificate;
contexts: Map<string, {
enc: Uint8Array;
auth: Uint8Array;
}>;
log: Logger;
constructor(sessionType: SessionType | undefined, deviceCredentials: WidevineDeviceCredentials, dispose?: (sessionId: string) => void, getServiceCertificate?: ServiceCertificateProvider, sessionNumber?: number);
setLogger(logger: Logger): void;
generateRequest(initData: Uint8Array, initDataType?: string): Promise<void>;
generateRequest(initDataType: string, initData: BufferSource): Promise<Uint8Array | void>;
waitForLicenseRequest(): Promise<Uint8Array<ArrayBufferLike>>;
load(sessionId: string): Promise<boolean>;
update(response: Uint8Array): Promise<void>;
getKeys(): Promise<Key[]>;
close(): Promise<void>;
remove(): Promise<void>;
pause(): string;
resume(state: string): WidevineSession;
static resume(state: string, deviceCredentials: WidevineDeviceCredentials, dispose?: (sessionId: string) => void, getServiceCertificate?: ServiceCertificateProvider): WidevineSession;
}
//#endregion
//#region src/lib/widevine/engine.d.ts
declare class Widevine extends BaseMediaKeysEngine {
keySystem: string;
sessions: Map<string, MediaKeysEngineSession>;
deviceCredentials: WidevineDeviceCredentials;
serverCertificate?: SignedDrmCertificate;
static DeviceCredentials: typeof WidevineDeviceCredentials;
constructor({
deviceCredentials
}: {
deviceCredentials: WidevineDeviceCredentials;
});
setServerCertificate(serverCertificate: Uint8Array): Promise<boolean>;
createSession(sessionType?: MediaKeySessionType): WidevineSession;
resumeSession(state: string): WidevineSession;
}
//#endregion
//#region src/lib/crypto/ecc-key.d.ts
declare class EccKey {
privateKey: bigint;
publicKey: AffinePoint<bigint>;
constructor(privateKey: bigint, publicKey: AffinePoint<bigint>);
static randomScalar(): bigint;
static generate(): EccKey;
static construct(privateKey: bigint): EccKey;
static from(data: Uint8Array): EccKey;
dumps(privateOnly?: boolean): Uint8Array<ArrayBuffer>;
privateBytes(): Uint8Array<ArrayBufferLike> & Uint8Array<ArrayBuffer>;
publicBytes(): Uint8Array<ArrayBuffer>;
privateSha256Digest(): Promise<Uint8Array<ArrayBuffer>>;
publicSha256Digest(): Promise<Uint8Array<ArrayBuffer>>;
}
//#endregion
//#region src/lib/playready/bcert.d.ts
declare const BCertCertType: {
readonly UNKNOWN: 0;
readonly PC: 1;
readonly DEVICE: 2;
readonly DOMAIN: 3;
readonly ISSUER: 4;
readonly CRL_SIGNER: 5;
readonly SERVICE: 6;
readonly SILVERLIGHT: 7;
readonly APPLICATION: 8;
readonly METERING: 9;
readonly KEYFILESIGNER: 10;
readonly SERVER: 11;
readonly LICENSESIGNER: 12;
readonly SECURETIMESERVER: 13;
readonly RPROVMODELAUTH: 14;
};
type TBCertCertType = (typeof BCertCertType)[keyof typeof BCertCertType];
declare const BCertObjType: {
readonly BASIC: 1;
readonly DOMAIN: 2;
readonly PC: 3;
readonly DEVICE: 4;
readonly FEATURE: 5;
readonly KEY: 6;
readonly MANUFACTURER: 7;
readonly SIGNATURE: 8;
readonly SILVERLIGHT: 9;
readonly METERING: 10;
readonly EXTDATASIGNKEY: 11;
readonly EXTDATACONTAINER: 12;
readonly EXTDATASIGNATURE: 13;
readonly EXTDATA_HWID: 14;
readonly SERVER: 15;
readonly SECURITY_VERSION: 16;
readonly SECURITY_VERSION_2: 17;
readonly UNKNOWN_OBJECT_ID: 65533;
};
type TBCertObjType = (typeof BCertObjType)[keyof typeof BCertObjType];
declare const BCert: {
decode(data: Uint8Array, debug?: boolean): {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
certificate_length: number;
attributes: {
flags: /*elided*/any;
tag: /*elided*/any;
length: /*elided*/any;
attribute: /*elided*/any;
}[];
};
encode(obj: {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
certificate_length: number;
attributes: {
flags: /*elided*/any;
tag: /*elided*/any;
length: /*elided*/any;
attribute: /*elided*/any;
}[];
}, debug?: boolean): Uint8Array;
parse(data: Uint8Array, debug?: boolean): {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
certificate_length: number;
attributes: {
flags: /*elided*/any;
tag: /*elided*/any;
length: /*elided*/any;
attribute: /*elided*/any;
}[];
};
build(obj: {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
certificate_length: number;
attributes: {
flags: /*elided*/any;
tag: /*elided*/any;
length: /*elided*/any;
attribute: /*elided*/any;
}[];
}, debug?: boolean): Uint8Array;
} & import("barsic").PrivateSchema<{
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
certificate_length: number;
attributes: {
flags: /*elided*/any;
tag: /*elided*/any;
length: /*elided*/any;
attribute: /*elided*/any;
}[];
}>;
type BCertType = b.infer<typeof BCert>;
declare const BCertChain: {
decode(data: Uint8Array, debug?: boolean): {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
flags: number;
certificate_count: number;
certificates: {
signature: /*elided*/any;
version: /*elided*/any;
total_length: /*elided*/any;
certificate_length: /*elided*/any;
attributes: /*elided*/any;
}[];
};
encode(obj: {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
flags: number;
certificate_count: number;
certificates: {
signature: /*elided*/any;
version: /*elided*/any;
total_length: /*elided*/any;
certificate_length: /*elided*/any;
attributes: /*elided*/any;
}[];
}, debug?: boolean): Uint8Array;
parse(data: Uint8Array, debug?: boolean): {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
flags: number;
certificate_count: number;
certificates: {
signature: /*elided*/any;
version: /*elided*/any;
total_length: /*elided*/any;
certificate_length: /*elided*/any;
attributes: /*elided*/any;
}[];
};
build(obj: {
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
flags: number;
certificate_count: number;
certificates: {
signature: /*elided*/any;
version: /*elided*/any;
total_length: /*elided*/any;
certificate_length: /*elided*/any;
attributes: /*elided*/any;
}[];
}, debug?: boolean): Uint8Array;
} & import("barsic").PrivateSchema<{
signature: Uint8Array<ArrayBufferLike>;
version: number;
total_length: number;
flags: number;
certificate_count: number;
certificates: {
signature: /*elided*/any;
version: /*elided*/any;
total_length: /*elided*/any;
certificate_length: /*elided*/any;
attributes: /*elided*/any;
}[];
}>;
type BCertChainType = b.infer<typeof BCertChain>;
declare class Certificate {
#private;
parsed: BCertType;
_BCERT: typeof BCert;
constructor(parsedBCert: BCertType, bcertObj?: typeof BCert);
static newLeafCert(params: {
certId: Uint8Array;
securityLevel: number;
clientId: Uint8Array;
signingKey: EccKey;
encryptionKey: EccKey;
groupKey: EccKey;
parent: CertificateChain;
expiry?: number;
}): Promise<Certificate>;
static loads(data: Uint8Array): Certificate;
getAttribute(type: TBCertObjType): {
flags: number;
tag: number;
length: number;
attribute: Uint8Array<ArrayBufferLike> | {
cert_id: /*elided*/any;
security_level: /*elided*/any;
flags: /*elided*/any;
cert_type: /*elided*/any;
public_key_digest: /*elided*/any;
expiration_date: /*elided*/any;
client_id: /*elided*/any;
} | {
service_id: /*elided*/any;
account_id: /*elided*/any;
revision_timestamp: /*elided*/any;
domain_url_length: /*elided*/any;
domain_url: /*elided*/any;
} | {
security_version: /*elided*/any;
} | {
max_license: /*elided*/any;
max_header: /*elided*/any;
max_chain_depth: /*elided*/any;
} | {
feature_count: /*elided*/any;
features: /*elided*/any;
} | {
key_count: /*elided*/any;
cert_keys: /*elided*/any;
} | {
flags: /*elided*/any;
manufacturer_name_length: /*elided*/any;
manufacturer_name: /*elided*/any;
model_name_length: /*elided*/any;
model_name: /*elided*/any;
model_number_length: /*elided*/any;
model_number: /*elided*/any;
} | {
metering_id: /*elided*/any;
metering_url_length: /*elided*/any;
metering_url: /*elided*/any;
} | {
key_type: /*elided*/any;
key_length: /*elided*/any;
flags: /*elided*/any;
key: /*elided*/any;
} | {
signature_type: /*elided*/any;
signature_size: /*elided*/any;
signature: /*elided*/any;
} | {
record: /*elided*/any;
signature: /*elided*/any;
} | {
warning_days: /*elided*/any;
};
} | undefined;
getSecurityLevel(): number | undefined;
getKeyByUsage(keyUsage: number): Uint8Array | undefined;
private static _unpad;
getName(): string | undefined;
getType(): number | undefined;
getExpirationDate(): number | undefined;
getSignatureKey(): Uint8Array | undefined;
getIssuerKey(): Uint8Array | undefined;
containsPublicKey(publicKey: Uint8Array | EccKey): boolean;
dumps: () => Uint8Array;
verify(publicKey: Uint8Array, index: number): Promise<void>;
}
declare class CertificateChain {
#private;
ECC256MSBCertRootIssuerPubKey: Uint8Array<ArrayBufferLike>;
parsed: BCertChainType;
_BCERT_CHAIN: typeof BCertChain;
constructor(parsedBCertChain: BCertChainType, bcertChainObj?: typeof BCertChain);
static from(data: Uint8Array): CertificateChain;
dumps(): Uint8Array<ArrayBufferLike>;
getSecurityLevel(): number;
getName(): string;
verify(options?: {
checkExpiry?: boolean;
certType?: TBCertCertType;
}): Promise<boolean>;
append(bcert: Certificate): void;
prepend(bcert: Certificate): void;
remove(index: number): void;
get(index: number): Certificate;
count(): number;
}
//#endregion
//#region src/lib/playready/device-credentials.d.ts
declare class PlayReadyDeviceCredentials {
groupKey: EccKey;
encryptionKey: EccKey;
signingKey: EccKey;
groupCertificate: CertificateChain;
securityLevel: number;
constructor(data: {
groupKey: Uint8Array;
encryptionKey: Uint8Array;
signingKey: Uint8Array;
groupCertificate: Uint8Array;
});
static from(payload: {
prd: Uint8Array;
} | {
groupKey: Uint8Array;
encryptionKey?: Uint8Array;
signingKey?: Uint8Array;
groupCertificate: Uint8Array;
}): Promise<PlayReadyDeviceCredentials>;
getName(): string;
get filename(): string;
get label(): string;
pack(): Uint8Array<ArrayBufferLike>;
unpack(): {
'zgpriv.dat': Uint8Array<ArrayBuffer>;
'bgroupcert.dat': Uint8Array<ArrayBufferLike>;
};
}
//#endregion
//#region src/lib/playready/revocation-info.d.ts
declare class RevocationInfoStore {
#private;
constructor();
merge(revInfoXml: string): boolean;
buildRequestXml(listIds?: readonly string[]): string;
snapshot(): Map<string, {
listId: string;
version: number;
xml: string;
}>;
dumpRevInfoXml(): string;
}
//#endregion
//#region src/lib/playready/engine.d.ts
declare class PlayReady extends BaseMediaKeysEngine {
#private;
static MAX_NUM_OF_SESSIONS: number;
keySystem: string;
sessions: Map<string, MediaKeysEngineSession>;
deviceCredentials: PlayReadyDeviceCredentials;
revocationInfo: RevocationInfoStore;
static DeviceCredentials: typeof PlayReadyDeviceCredentials;
constructor(options: {
deviceCredentials: PlayReadyDeviceCredentials;
});
setServerCertificate(): Promise<boolean>;
createSession(sessionType?: MediaKeySessionType): MediaKeysEngineSession;
resumeSession(state: string): MediaKeysEngineSession;
}
//#endregion
//#region src/lib/remote/engine.d.ts
type RemoteParams = {
keySystem: string;
baseUrl: string;
secret?: string;
client?: string;
headers?: Record<string, string>;
requestTimeoutMs?: number;
};
declare const createHttpClient: ({
baseUrl,
secret,
...params
}: RemoteParams) => {
post: (route: string, body?: object) => Promise<any>;
get: (route: string) => Promise<any>;
delete: (route: string) => Promise<any>;
};
declare class RemoteSession extends BaseMediaKeysEngineSession {
#private;
constructor(sessionId: string, sessionType: MediaKeySessionType, http: ReturnType<typeof createHttpClient>, dispose: (sessionId: string) => void);
generateRequest(initData: Uint8Array, initDataType?: string): Promise<void>;
update(response: Uint8Array): Promise<void>;
close(): Promise<void>;
remove(): Promise<void>;
}
declare class Remote extends BaseMediaKeysEngine {
#private;
keySystem: string;
sessions: Map<string, RemoteSession>;
constructor(params: RemoteParams);
setServerCertificate(): Promise<boolean>;
createSession(sessionType?: MediaKeySessionType): Promise<RemoteSession>;
}
//#endregion
//#region src/lib/main.d.ts
interface FetchDecryptionKeysParams {
cdm: MediaKeysEngine;
pssh: string;
server: string;
individualizationServer?: string;
headers?: Record<string, string>;
fetch?: typeof fetch;
transformRequest?: (request: Request) => Promise<Request>;
transformResponse?: (response: Response) => Promise<Response>;
logger?: Logger;
}
declare const fetchDecryptionKeys: (params: FetchDecryptionKeysParams) => Promise<MediaKeysMap>;
//#endregion
export { ALL_ENGINES, BaseMediaKeysEngine, BaseMediaKeysEngineSession, BinaryReader, Bytes, BytesLike, CLIENT_TYPE, ClientType, EncryptedPacket, EncryptionPattern, EncryptionScheme, Logger, MediaKey, MediaKeyId, MediaKeyMessageEvent, MediaKeyMessageEvent as MessageEvent, MediaKeyMessageEventInit, MediaKeySessionId, MediaKeyStatusesChangeEventInit, MediaKeysEngine, MediaKeysEngineSession, MediaKeysMap, PlayReady, PlayReadyDeviceCredentials, PsshBox, Remote, SecurityLevel, Session, SubsampleEncryption, WaitForKeysOptions, Widevine, WidevineDeviceCredentials, base64ToBytes, bytesToBase64, bytesToString, compareArrays, decryptPacketWithKey, decryptPacketWithKeyBytes, decryptPacketWithKeys, fetchDecryptionKeys, fromBase64, fromBinary, fromBuffer, fromHex, fromText, getRandomBytes, parseBufferSource, requestMediaKeySystemAccess, setSupportedEngines, stringToBytes, toBufferSource, toBytes, waitForKeys, xorArrays };