forked from kapmahc/epub
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathencryption.go
38 lines (30 loc) · 941 Bytes
/
encryption.go
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
package epub
//Encryption encruption.xml
type Encryption struct {
EncryptedData []EncryptedData `xml:"EncryptedData" json:"encrypted_data"`
}
type EncryptedData struct {
EncryptionMethod EncryptionMethod `xml:"EncryptionMethod"`
KeyInfo KeyInfo `xml:"KeyInfo"`
CipherData CipherData `xml:"CipherData"`
EncryptionProperties []EncryptionProperty `xml:"EncryptionProperties>EncryptionProperty"`
}
type EncryptionProperty struct {
Compression Compression `xml:"Compression"`
}
type Compression struct {
Method string `xml:"Method,attr"`
OriginalLength string `xml:"OriginalLength,attr"`
}
type EncryptionMethod struct {
Algorithm string `xml:"Algorithm,attr"`
}
type KeyInfo struct {
Resource string `xml:",chardata"`
}
type CipherData struct {
CipherReference CipherReference `xml:"CipherReference"`
}
type CipherReference struct {
URI string `xml:"URI,attr"`
}