Encrypt through subprocess
This commit is contained in:
parent
99103b84b8
commit
e081e1616a
1 changed files with 5 additions and 3 deletions
|
|
@ -142,10 +142,12 @@ const encryptMessage = async ({ message = '', deviceId }) => {
|
|||
|
||||
const processedPublicKey = processKey(publicKey)
|
||||
const messageBuffer = convertUTF8ToBuffer(parsedMessage)
|
||||
const encryptedMessage = await ECCrypto.encrypt(
|
||||
processedPublicKey,
|
||||
messageBuffer
|
||||
const encryptedMessage = await invoke(
|
||||
'encrypt',
|
||||
[processedPublicKey, messageBuffer],
|
||||
cryptoSubprocess
|
||||
)
|
||||
|
||||
const encryptedMessageResponse = {
|
||||
ciphertext: encryptedMessage.ciphertext,
|
||||
iv: encryptedMessage.iv,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue