@@ -201,14 +201,17 @@ const saltpackEncrypt = async (
201201 switch ( type ) {
202202 case 'file' : {
203203 try {
204- const fileRes = await RPCTypes . saltpackSaltpackEncryptFileRpcPromise ( {
205- filename : input . stringValue ( ) ,
206- opts : {
207- includeSelf : options . includeSelf ,
208- recipients : recipients ,
209- signed : options . sign ,
204+ const fileRes = await RPCTypes . saltpackSaltpackEncryptFileRpcPromise (
205+ {
206+ filename : input . stringValue ( ) ,
207+ opts : {
208+ includeSelf : options . includeSelf ,
209+ recipients : recipients ,
210+ signed : options . sign ,
211+ } ,
210212 } ,
211- } )
213+ Constants . encryptFileWaitingKey
214+ )
212215 return CryptoGen . createOnOperationSuccess ( {
213216 operation : Constants . Operations . Encrypt ,
214217 output : new HiddenString ( fileRes . filename ) ,
@@ -227,14 +230,17 @@ const saltpackEncrypt = async (
227230 }
228231 case 'text' : {
229232 try {
230- const encryptRes = await RPCTypes . saltpackSaltpackEncryptStringRpcPromise ( {
231- opts : {
232- includeSelf : options . includeSelf ,
233- recipients : recipients ,
234- signed : options . sign ,
233+ const encryptRes = await RPCTypes . saltpackSaltpackEncryptStringRpcPromise (
234+ {
235+ opts : {
236+ includeSelf : options . includeSelf ,
237+ recipients : recipients ,
238+ signed : options . sign ,
239+ } ,
240+ plaintext : input . stringValue ( ) ,
235241 } ,
236- plaintext : input . stringValue ( ) ,
237- } )
242+ Constants . encryptStringWaitingKey
243+ )
238244 return CryptoGen . createOnOperationSuccess ( {
239245 operation : Constants . Operations . Encrypt ,
240246 output : new HiddenString ( encryptRes . ciphertext ) ,
@@ -266,9 +272,12 @@ const saltpackDecrypt = async (action: CryptoGen.SaltpackDecryptPayload, logger:
266272 switch ( type ) {
267273 case 'file' : {
268274 try {
269- const result = await RPCTypes . saltpackSaltpackDecryptFileRpcPromise ( {
270- encryptedFilename : input . stringValue ( ) ,
271- } )
275+ const result = await RPCTypes . saltpackSaltpackDecryptFileRpcPromise (
276+ {
277+ encryptedFilename : input . stringValue ( ) ,
278+ } ,
279+ Constants . decryptFileWaitingKey
280+ )
272281 const { decryptedFilename, info, signed} = result
273282 const { sender} = info
274283 const { username} = sender
@@ -291,9 +300,12 @@ const saltpackDecrypt = async (action: CryptoGen.SaltpackDecryptPayload, logger:
291300 }
292301 case 'text' : {
293302 try {
294- const result = await RPCTypes . saltpackSaltpackDecryptStringRpcPromise ( {
295- ciphertext : input . stringValue ( ) ,
296- } )
303+ const result = await RPCTypes . saltpackSaltpackDecryptStringRpcPromise (
304+ {
305+ ciphertext : input . stringValue ( ) ,
306+ } ,
307+ Constants . decryptStringWaitingKey
308+ )
297309 const { plaintext, info, signed} = result
298310 const { sender} = info
299311 const { username} = sender
@@ -334,9 +346,12 @@ const saltpackSign = async (
334346 switch ( type ) {
335347 case 'file' : {
336348 try {
337- const signedFilename = await RPCTypes . saltpackSaltpackSignFileRpcPromise ( {
338- filename : input . stringValue ( ) ,
339- } )
349+ const signedFilename = await RPCTypes . saltpackSaltpackSignFileRpcPromise (
350+ {
351+ filename : input . stringValue ( ) ,
352+ } ,
353+ Constants . signFileWaitingKey
354+ )
340355 return CryptoGen . createOnOperationSuccess ( {
341356 operation : Constants . Operations . Sign ,
342357 output : new HiddenString ( signedFilename ) ,
@@ -355,9 +370,12 @@ const saltpackSign = async (
355370 }
356371 case 'text' : {
357372 try {
358- const ciphertext = await RPCTypes . saltpackSaltpackSignStringRpcPromise ( {
359- plaintext : input . stringValue ( ) ,
360- } )
373+ const ciphertext = await RPCTypes . saltpackSaltpackSignStringRpcPromise (
374+ {
375+ plaintext : input . stringValue ( ) ,
376+ } ,
377+ Constants . signStringWaitingKey
378+ )
361379 return CryptoGen . createOnOperationSuccess ( {
362380 operation : Constants . Operations . Sign ,
363381 output : new HiddenString ( ciphertext ) ,
@@ -388,9 +406,12 @@ const saltpackVerify = async (action: CryptoGen.SaltpackVerifyPayload, logger: S
388406 switch ( type ) {
389407 case 'file' : {
390408 try {
391- const result = await RPCTypes . saltpackSaltpackVerifyFileRpcPromise ( {
392- signedFilename : input . stringValue ( ) ,
393- } )
409+ const result = await RPCTypes . saltpackSaltpackVerifyFileRpcPromise (
410+ {
411+ signedFilename : input . stringValue ( ) ,
412+ } ,
413+ Constants . verifyFileWaitingKey
414+ )
394415 const { verifiedFilename, sender, verified} = result
395416 const { username} = sender
396417 const outputSigned = verified
@@ -413,7 +434,10 @@ const saltpackVerify = async (action: CryptoGen.SaltpackVerifyPayload, logger: S
413434 }
414435 case 'text' : {
415436 try {
416- const result = await RPCTypes . saltpackSaltpackVerifyStringRpcPromise ( { signedMsg : input . stringValue ( ) } )
437+ const result = await RPCTypes . saltpackSaltpackVerifyStringRpcPromise (
438+ { signedMsg : input . stringValue ( ) } ,
439+ Constants . verifyStringWaitingKey
440+ )
417441 const { plaintext, sender, verified} = result
418442 const { username} = sender
419443 const outputSigned = verified
0 commit comments