diff options
Diffstat (limited to 'benchmark/crypto')
-rw-r--r-- | benchmark/crypto/cipher-stream.js | 4 | ||||
-rw-r--r-- | benchmark/crypto/hash-stream-creation.js | 4 | ||||
-rw-r--r-- | benchmark/crypto/hash-stream-throughput.js | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/benchmark/crypto/cipher-stream.js b/benchmark/crypto/cipher-stream.js index 11e2c38c0b..03780ba130 100644 --- a/benchmark/crypto/cipher-stream.js +++ b/benchmark/crypto/cipher-stream.js @@ -40,11 +40,11 @@ function main(conf) { var encoding; switch (conf.type) { case 'asc': - message = new Array(conf.len + 1).join('a'); + message = 'a'.repeat(conf.len); encoding = 'ascii'; break; case 'utf': - message = new Array(conf.len / 2 + 1).join('ü'); + message = 'ü'.repeat(conf.len / 2); encoding = 'utf8'; break; case 'buf': diff --git a/benchmark/crypto/hash-stream-creation.js b/benchmark/crypto/hash-stream-creation.js index e7fcde3aa6..3be09785ac 100644 --- a/benchmark/crypto/hash-stream-creation.js +++ b/benchmark/crypto/hash-stream-creation.js @@ -25,11 +25,11 @@ function main(conf) { var encoding; switch (conf.type) { case 'asc': - message = new Array(conf.len + 1).join('a'); + message = 'a'.repeat(conf.len); encoding = 'ascii'; break; case 'utf': - message = new Array(conf.len / 2 + 1).join('ü'); + message = 'ü'.repeat(conf.len / 2); encoding = 'utf8'; break; case 'buf': diff --git a/benchmark/crypto/hash-stream-throughput.js b/benchmark/crypto/hash-stream-throughput.js index 732c2b89c7..bf426fc2c9 100644 --- a/benchmark/crypto/hash-stream-throughput.js +++ b/benchmark/crypto/hash-stream-throughput.js @@ -24,11 +24,11 @@ function main(conf) { var encoding; switch (conf.type) { case 'asc': - message = new Array(conf.len + 1).join('a'); + message = 'a'.repeat(conf.len); encoding = 'ascii'; break; case 'utf': - message = new Array(conf.len / 2 + 1).join('ü'); + message = 'ü'.repeat(conf.len / 2); encoding = 'utf8'; break; case 'buf': |