@pageproof/sdk-pr 280.0.1602046227525 → 280.0.1602104047768
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/Encryption.d.ts +217 -17
- package/lib/api/Encryption.js +1 -1
- package/lib/pageproof.js +1 -1
- package/lib/sync-crypto-adapter.js +1 -1
- package/lib/util/constants.d.ts +2 -0
- package/lib/util/constants.js +1 -1
- package/lib/util/encryptionVersions.json +10 -0
- package/lib/worker-crypto-adapter.js +1 -1
- package/lib/{worker.4c92246e.js → worker.5ce37299.js} +2 -2
- package/package.json +1 -1
package/lib/api/Encryption.d.ts
CHANGED
|
@@ -26,23 +26,223 @@ declare class Encryption extends API {
|
|
|
26
26
|
data: Blob | Buffer;
|
|
27
27
|
envelope: string;
|
|
28
28
|
}): any;
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Generates an encryption key for a file.
|
|
31
|
+
*
|
|
32
|
+
* This method outputs the encryption version (encryptionVersion) and envelope - both of which are used in the encryption process.
|
|
33
|
+
*
|
|
34
|
+
* Note: Omitting the encryption version argument will result in the default encryption version your version of the SDK specifies.
|
|
35
|
+
*
|
|
36
|
+
* Note: When manually specifying an encryption version (by hard coding it), it's important you understand the implications that has on how the file is encrypted.
|
|
37
|
+
*
|
|
38
|
+
* @example <caption>Generating a file encryption key (using the default encryption version)</caption>
|
|
39
|
+
* const { encryptionVersion, envelope } = await client.encryption.generateFileEncryptionKey();
|
|
40
|
+
* console.log(encryptionVersion); // eg. "0001"
|
|
41
|
+
*
|
|
42
|
+
* @param {string} [encryptionVersion] The encryption version used when encrypting the file
|
|
43
|
+
* @returns {Promise<{ encryptionVersion: string, envelope: string | null, keyIV: { key: string, iv: string } | null }>}
|
|
44
|
+
*/
|
|
45
|
+
generateFileEncryptionKey(encryptionVersion?: string): Promise<{
|
|
46
|
+
encryptionVersion: string;
|
|
47
|
+
envelope: string;
|
|
48
|
+
keyIV: {
|
|
49
|
+
key: string;
|
|
50
|
+
iv: string;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
/** @private */
|
|
30
54
|
_transformFile(direction: any, variant: any, data: any, envelopeOrKeyIV: any, encryptionVersion: any): any;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Encrypts a thumbnail (for a file).
|
|
57
|
+
*
|
|
58
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the thumbnail.
|
|
59
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the thumbnail.
|
|
60
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) thumbnail data.
|
|
61
|
+
* @returns {Buffer|Blob}
|
|
62
|
+
*/
|
|
63
|
+
encryptFileThumbnail(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
64
|
+
key: string;
|
|
65
|
+
iv: string;
|
|
66
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
67
|
+
/**
|
|
68
|
+
* Decrypts a thumbnail (for a file).
|
|
69
|
+
*
|
|
70
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the thumbnail.
|
|
71
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the thumbnail.
|
|
72
|
+
* @param {Buffer|Blob} data The encrypted thumbnail data.
|
|
73
|
+
* @returns {Buffer|Blob}
|
|
74
|
+
*/
|
|
75
|
+
decryptFileThumbnail(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
76
|
+
key: string;
|
|
77
|
+
iv: string;
|
|
78
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
79
|
+
/**
|
|
80
|
+
* Encrypts a sprite sheet (for a file).
|
|
81
|
+
*
|
|
82
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the sprite sheet.
|
|
83
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the sprite sheet.
|
|
84
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) sprite sheet data.
|
|
85
|
+
* @returns {Buffer|Blob}
|
|
86
|
+
*/
|
|
87
|
+
encryptFileSpriteSheet(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
88
|
+
key: string;
|
|
89
|
+
iv: string;
|
|
90
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
91
|
+
/**
|
|
92
|
+
* Decrypts a sprite sheet (for a file).
|
|
93
|
+
*
|
|
94
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the sprite sheet.
|
|
95
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the sprite sheet.
|
|
96
|
+
* @param {Buffer|Blob} data The encrypted sprite sheet data.
|
|
97
|
+
* @returns {Buffer|Blob}
|
|
98
|
+
*/
|
|
99
|
+
decryptFileSpriteSheet(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
100
|
+
key: string;
|
|
101
|
+
iv: string;
|
|
102
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
103
|
+
/**
|
|
104
|
+
* Encrypts a low resolution preview (for a file).
|
|
105
|
+
*
|
|
106
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the low resolution preview.
|
|
107
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the low resolution preview.
|
|
108
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) low resolution preview data.
|
|
109
|
+
* @returns {Buffer|Blob}
|
|
110
|
+
*/
|
|
111
|
+
encryptFilePreviewLow(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
112
|
+
key: string;
|
|
113
|
+
iv: string;
|
|
114
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
115
|
+
/**
|
|
116
|
+
* Decrypts a low resolution preview (for a file).
|
|
117
|
+
*
|
|
118
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the low resolution preview.
|
|
119
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the low resolution preview.
|
|
120
|
+
* @param {Buffer|Blob} data The encrypted low resolution preview data.
|
|
121
|
+
* @returns {Buffer|Blob}
|
|
122
|
+
*/
|
|
123
|
+
decryptFilePreviewLow(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
124
|
+
key: string;
|
|
125
|
+
iv: string;
|
|
126
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
127
|
+
/**
|
|
128
|
+
* Encrypts a high resolution preview (for a file).
|
|
129
|
+
*
|
|
130
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the high resolution preview.
|
|
131
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the high resolution preview.
|
|
132
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) high resolution preview data.
|
|
133
|
+
* @returns {Buffer|Blob}
|
|
134
|
+
*/
|
|
135
|
+
encryptFilePreviewHigh(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
136
|
+
key: string;
|
|
137
|
+
iv: string;
|
|
138
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
139
|
+
/**
|
|
140
|
+
* Decrypts a high resolution preview (for a file).
|
|
141
|
+
*
|
|
142
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the high resolution preview.
|
|
143
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the high resolution preview.
|
|
144
|
+
* @param {Buffer|Blob} data The encrypted sprite sheet data.
|
|
145
|
+
* @returns {Buffer|Blob}
|
|
146
|
+
*/
|
|
147
|
+
decryptFilePreviewHigh(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
148
|
+
key: string;
|
|
149
|
+
iv: string;
|
|
150
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
151
|
+
/**
|
|
152
|
+
* Encrypts a chunk of original contents (for a file).
|
|
153
|
+
*
|
|
154
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the chunk of original contents.
|
|
155
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the chunk of original contents.
|
|
156
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) chunk of original contents data.
|
|
157
|
+
* @returns {Buffer|Blob}
|
|
158
|
+
*/
|
|
159
|
+
encryptFileContentsPerChunk(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
160
|
+
key: string;
|
|
161
|
+
iv: string;
|
|
162
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
163
|
+
/**
|
|
164
|
+
* Decrypts a chunk of original contents (for a file).
|
|
165
|
+
*
|
|
166
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the chunk of original contents.
|
|
167
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the chunk of original contents.
|
|
168
|
+
* @param {Buffer|Blob} data The encrypted chunk of original contents data.
|
|
169
|
+
* @returns {Buffer|Blob}
|
|
170
|
+
*/
|
|
171
|
+
decryptFileContentsPerChunk(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
172
|
+
key: string;
|
|
173
|
+
iv: string;
|
|
174
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
175
|
+
/**
|
|
176
|
+
* Encrypts a extracted text (for a file).
|
|
177
|
+
*
|
|
178
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the extracted text.
|
|
179
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the extracted text.
|
|
180
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) extracted text data.
|
|
181
|
+
* @returns {Buffer|Blob}
|
|
182
|
+
*/
|
|
183
|
+
encryptFileExtractedText(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
184
|
+
key: string;
|
|
185
|
+
iv: string;
|
|
186
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
187
|
+
/**
|
|
188
|
+
* Decrypts a extracted text (for a file).
|
|
189
|
+
*
|
|
190
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the extracted text.
|
|
191
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the extracted text.
|
|
192
|
+
* @param {Buffer|Blob} data The encrypted extracted text data.
|
|
193
|
+
* @returns {Buffer|Blob}
|
|
194
|
+
*/
|
|
195
|
+
decryptFileExtractedText(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
196
|
+
key: string;
|
|
197
|
+
iv: string;
|
|
198
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
199
|
+
/**
|
|
200
|
+
* Encrypts a upload chunk (for a file).
|
|
201
|
+
*
|
|
202
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the upload chunk.
|
|
203
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the upload chunk.
|
|
204
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) upload chunk data.
|
|
205
|
+
* @returns {Buffer|Blob}
|
|
206
|
+
*/
|
|
207
|
+
encryptFileUploadPerChunk(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
208
|
+
key: string;
|
|
209
|
+
iv: string;
|
|
210
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
211
|
+
/**
|
|
212
|
+
* Decrypts a upload chunk (for a file).
|
|
213
|
+
*
|
|
214
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the upload chunk.
|
|
215
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the upload chunk.
|
|
216
|
+
* @param {Buffer|Blob} data The encrypted upload chunk data.
|
|
217
|
+
* @returns {Buffer|Blob}
|
|
218
|
+
*/
|
|
219
|
+
decryptFileUploadPerChunk(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
220
|
+
key: string;
|
|
221
|
+
iv: string;
|
|
222
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
223
|
+
/**
|
|
224
|
+
* Encrypts a rendition (for a file).
|
|
225
|
+
*
|
|
226
|
+
* @param {string} encryptionVersion The encryption version used to encrypt the rendition.
|
|
227
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to encrypt the rendition.
|
|
228
|
+
* @param {Buffer|Blob} data The raw (un-encrypted) rendition data.
|
|
229
|
+
* @returns {Buffer|Blob}
|
|
230
|
+
*/
|
|
231
|
+
encryptFileRendition(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
232
|
+
key: string;
|
|
233
|
+
iv: string;
|
|
234
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
235
|
+
/**
|
|
236
|
+
* Decrypts a rendition (for a file).
|
|
237
|
+
*
|
|
238
|
+
* @param {string} encryptionVersion The encryption version used to decrypt the rendition.
|
|
239
|
+
* @param {string|{ key: string, iv: string }|null} envelopeOrKeyIV The envelope (or key IV object) used to decrypt the rendition.
|
|
240
|
+
* @param {Buffer|Blob} data The encrypted rendition data.
|
|
241
|
+
* @returns {Buffer|Blob}
|
|
242
|
+
*/
|
|
243
|
+
decryptFileRendition(encryptionVersion: string, envelopeOrKeyIV: string | {
|
|
244
|
+
key: string;
|
|
245
|
+
iv: string;
|
|
246
|
+
}, data: Blob | Buffer): Blob | Buffer;
|
|
47
247
|
}
|
|
48
248
|
import API from "./API";
|
package/lib/api/Encryption.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);var _encryptionVersions=require("../util/encryptionVersions.json");var _encryptionVersions2=_interopRequireDefault(_encryptionVersions);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Encryption=function(_API){_inherits(Encryption,_API);function Encryption(){_classCallCheck(this,Encryption);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Encryption.prototype.decrypt=function decrypt(_ref){var _this2=this;var version=_ref.version,data=_ref.data,envelope=_ref.envelope;var bluffer=new _bluffer2.default;var content=typeof data==="string"?bluffer.create(data):Promise.resolve(data);return content.then(function(content$){return bluffer.read(content$).then(function(data$){return _this2.client.crypto().decryptData(version,data$,envelope,_this2.client.session.privateKeyPEM).then(function(decrypted){return bluffer.create(decrypted)})})})};Encryption.prototype.generateFileEncryptionKey=function generateFileEncryptionKey(){var _this3=this;var encryptionVersion=arguments.length>0&&arguments[0]!==undefined?arguments[0]:
|
|
1
|
+
"use strict";exports.__esModule=true;var _API2=require("./API");var _API3=_interopRequireDefault(_API2);var _bluffer=require("../bluffer");var _bluffer2=_interopRequireDefault(_bluffer);var _encryptionVersions=require("../util/encryptionVersions.json");var _encryptionVersions2=_interopRequireDefault(_encryptionVersions);var _constants=require("../util/constants");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var Encryption=function(_API){_inherits(Encryption,_API);function Encryption(){_classCallCheck(this,Encryption);return _possibleConstructorReturn(this,_API.apply(this,arguments))}Encryption.prototype.decrypt=function decrypt(_ref){var _this2=this;var version=_ref.version,data=_ref.data,envelope=_ref.envelope;var bluffer=new _bluffer2.default;var content=typeof data==="string"?bluffer.create(data):Promise.resolve(data);return content.then(function(content$){return bluffer.read(content$).then(function(data$){return _this2.client.crypto().decryptData(version,data$,envelope,_this2.client.session.privateKeyPEM).then(function(decrypted){return bluffer.create(decrypted)})})})};Encryption.prototype.generateFileEncryptionKey=function generateFileEncryptionKey(){var _this3=this;var encryptionVersion=arguments.length>0&&arguments[0]!==undefined?arguments[0]:_constants.DEFAULT_FILE_ENCRYPTION_VERSION;if(encryptionVersion==="0000"){return Promise.resolve({encryptionVersion:"0000",envelope:null,keyIV:null})}return this.client.crypto().generateKeyIV().then(function(keyIV){return Promise.all([{key:keyIV.key,iv:keyIV.iv},_this3.client.crypto().envelopeSeal(keyIV.keyIV,[_this3.client.session.serverPublicKeyPEM,_this3.client.session.publicKeyPEM],false)])}).then(function(_ref2){var keyIV=_ref2[0],envelope=_ref2[1];return{encryptionVersion:encryptionVersion,envelope:envelope,keyIV:keyIV}})};Encryption.prototype._transformFile=function _transformFile(direction,variant,data,envelopeOrKeyIV,encryptionVersion){var _this4=this;var bluffer=new _bluffer2.default;return bluffer.readBase64(data).then(function(base64Data){return _this4.client.crypto().transformFile(direction,variant,base64Data,"base64",envelopeOrKeyIV,_this4.client.session.privateKeyPEM,_encryptionVersions2.default,encryptionVersion)}).then(function(base64Output){return bluffer.createBase64(base64Output)})};Encryption.prototype.encryptFileThumbnail=function encryptFileThumbnail(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","thumbnail",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileThumbnail=function decryptFileThumbnail(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","thumbnail",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFileSpriteSheet=function encryptFileSpriteSheet(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","sprite_sheet",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileSpriteSheet=function decryptFileSpriteSheet(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","sprite_sheet",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFilePreviewLow=function encryptFilePreviewLow(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","preview_low",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFilePreviewLow=function decryptFilePreviewLow(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","preview_low",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFilePreviewHigh=function encryptFilePreviewHigh(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","preview_high",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFilePreviewHigh=function decryptFilePreviewHigh(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","preview_high",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFileContentsPerChunk=function encryptFileContentsPerChunk(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","contents_per_chunk",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileContentsPerChunk=function decryptFileContentsPerChunk(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","contents_per_chunk",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFileExtractedText=function encryptFileExtractedText(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","extracted_text",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileExtractedText=function decryptFileExtractedText(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","extracted_text",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFileUploadPerChunk=function encryptFileUploadPerChunk(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","upload_per_chunk",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileUploadPerChunk=function decryptFileUploadPerChunk(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","upload_per_chunk",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.encryptFileRendition=function encryptFileRendition(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("in","rendition",data,envelopeOrKeyIV,encryptionVersion)};Encryption.prototype.decryptFileRendition=function decryptFileRendition(encryptionVersion,envelopeOrKeyIV,data){return this._transformFile("out","rendition",data,envelopeOrKeyIV,encryptionVersion)};return Encryption}(_API3.default);exports.default=Encryption;
|