-
Notifications
You must be signed in to change notification settings - Fork 10
/
AesEncryptionDrm.ts
59 lines (51 loc) · 1.34 KB
/
AesEncryptionDrm.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import {map, mapArray} from '../common/Mapper';
import AesEncryptionMethod from './AesEncryptionMethod';
import Drm from './Drm';
import DrmType from './DrmType';
import EncodingOutput from './EncodingOutput';
/**
* @export
* @class AesEncryptionDrm
*/
export class AesEncryptionDrm extends Drm {
/**
* Discriminator property for Drm
* @type {string}
* @memberof AesEncryptionDrm
*/
public readonly type: DrmType = DrmType.AES;
/**
* 16 byte Encryption key, 32 hexadecimal characters (required)
* @type {string}
* @memberof AesEncryptionDrm
*/
public key?: string;
/**
* 16 byte initialization vector
* @type {string}
* @memberof AesEncryptionDrm
*/
public iv?: string;
/**
* Path relative to the output for referencing in the manifest. If this value is not set the key file will be written automatically to the output folder.
* @type {string}
* @memberof AesEncryptionDrm
*/
public keyFileUri?: string;
/**
* @type {AesEncryptionMethod}
* @memberof AesEncryptionDrm
*/
public method?: AesEncryptionMethod;
constructor(obj?: Partial<AesEncryptionDrm>) {
super(obj);
if(!obj) {
return;
}
this.key = map(obj.key);
this.iv = map(obj.iv);
this.keyFileUri = map(obj.keyFileUri);
this.method = map(obj.method);
}
}
export default AesEncryptionDrm;