From 04bebb09c91702ba21973a5edd0fcea581368e09 Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Tue, 16 Jun 2020 16:58:58 +0200 Subject: [PATCH] tidy: remove legacy functions --- index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.js b/index.js index df09fcb..fb9f27b 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict' // Based on https://github.com/dchest/tweetnacl-js/blob/6dcbcaf5f5cbfd313f2dcfe763db35c828c8ff5b/nacl-fast.js. @@ -11,7 +11,6 @@ var sodium = module.exports // See for details: http://tweetnacl.cr.yp.to/ // also forwarded at the bottom but randombytes is non-enumerable -var randombytes = require('./randombytes').randombytes sodium.sodium_memzero = function (arr) { arr.fill(0) @@ -21,10 +20,6 @@ sodium.sodium_malloc = function (n) { return new Uint8Array(n) } -function cleanup(arr) { - for (var i = 0; i < arr.length; i++) arr[i] = 0; -} - forward(require('./crypto_box')) forward(require('./crypto_generichash')) forward(require('./crypto_hash'))