Fix for #1219 (sodium methods) (#1220)

* Change node-opus methods

* Try using crypto_secretbox(_open)_easy

* Wrong open method name
This commit is contained in:
Programmix
2017-03-04 00:33:19 -08:00
committed by Amish Shah
parent 33de408a70
commit 055775de2f

View File

@@ -1,8 +1,8 @@
try {
const sodium = require('sodium');
module.exports = {
open: sodium.api.crypto_secretbox_open,
close: sodium.api.crypto_secretbox,
open: sodium.api.crypto_secretbox_open_easy,
close: sodium.api.crypto_secretbox_easy,
};
} catch (err) {
const tweetnacl = require('tweetnacl');