UNPKG

@readium/shared

Version:

Shared models to be used across other Readium projects and implementations in Typescript

34 lines (33 loc) 1.14 kB
/** Indicates that a resource is encrypted/obfuscated and provides relevant information * for decryption. */ export declare class Encryption { /** Identifies the algorithm used to encrypt the resource. */ readonly algorithm: string; /** Compression method used on the resource. */ readonly compression?: string; /** Original length of the resource in bytes before compression and/or encryption. */ readonly originalLength?: number; /** Identifies the encryption profile used to encrypt the resource. */ readonly profile?: string; /** Identifies the encryption scheme used to encrypt the resource. */ readonly scheme?: string; /** * Creates a [Encryption]. */ constructor(values: { algorithm: string; compression?: string; originalLength?: number; profile?: string; scheme?: string; }); /** * Parses a [Encryption] from its RWPM JSON representation. */ static deserialize(json: any): Encryption | undefined; /** * Serializes a [Encryption] to its RWPM JSON representation. */ serialize(): any; }