Newer
Older
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
function CryptoData() {}
CryptoData.prototype.set = function(obj) {
for(var member in obj) {
this[member] = JSON.parse(JSON.stringify(obj[member]))
}
};
CryptoData.prototype.serialize = function() {
return JSON.stringify(this)
};
CryptoData.prototype.deserialize = function(serialized) {
var obj = JSON.parse(serialized);
this.set(obj)
};
CryptoData.prototype.setPublicKey = function(publicKey) {
this["publicKey"] = publicKey
};
CryptoData.prototype.getPublicKey = function() {
return this["publicKey"]
};
CryptoData.prototype.setPrivateKey = function(privateKey) {
this["privateKey"] = privateKey
};
CryptoData.prototype.getPrivateKey = function() {
return this["privateKey"]
};
CryptoData.prototype.setx509Certificate = function(x509Certificate) {
this["x509Certificate"] = x509Certificate
};
CryptoData.prototype.getx509Certificate = function() {
return this["x509Certificate"]
};
CryptoData.prototype.setKeyUUID = function(keyUUID) {
this["keyUUID"] = keyUUID
};
CryptoData.prototype.getKeyUUID = function() {
return this["keyUUID"]
};
CryptoData.prototype.setChain = function(chain) {
this["chain"] = chain
};
CryptoData.prototype.getChain = function() {
return this["chain"]
};
export default CryptoData;