angular-slickgrid 4.2.6 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/{index.d.ts → angular-slickgrid.d.ts} +0 -0
  2. package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +1 -1
  3. package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +6 -7
  4. package/esm2020/app/modules/angular-slickgrid/modules/angular-slickgrid.module.mjs +10 -7
  5. package/esm2020/app/modules/angular-slickgrid/services/angularUtil.service.mjs +4 -4
  6. package/esm2020/app/modules/angular-slickgrid/services/bsDropdown.service.mjs +4 -4
  7. package/esm2020/app/modules/angular-slickgrid/services/container.service.mjs +4 -4
  8. package/esm2020/app/modules/angular-slickgrid/services/translater.service.mjs +4 -4
  9. package/fesm2015/angular-slickgrid.mjs +26 -24
  10. package/fesm2015/angular-slickgrid.mjs.map +1 -1
  11. package/fesm2020/angular-slickgrid.mjs +26 -24
  12. package/fesm2020/angular-slickgrid.mjs.map +1 -1
  13. package/package.json +17 -17
  14. package/test/cypress/node_modules/@cypress/request/README.md +0 -1038
  15. package/test/cypress/node_modules/@cypress/xvfb/README.md +0 -48
  16. package/test/cypress/node_modules/@cypress/xvfb/node_modules/debug/README.md +0 -437
  17. package/test/cypress/node_modules/@types/node/README.md +0 -16
  18. package/test/cypress/node_modules/@types/sinonjs__fake-timers/README.md +0 -16
  19. package/test/cypress/node_modules/@types/sizzle/README.md +0 -16
  20. package/test/cypress/node_modules/@types/yauzl/README.md +0 -16
  21. package/test/cypress/node_modules/@types/yauzl/node_modules/@types/node/README.md +0 -16
  22. package/test/cypress/node_modules/aggregate-error/README.md +0 -61
  23. package/test/cypress/node_modules/ansi-colors/README.md +0 -315
  24. package/test/cypress/node_modules/ansi-escapes/README.md +0 -245
  25. package/test/cypress/node_modules/ansi-regex/README.md +0 -78
  26. package/test/cypress/node_modules/ansi-styles/README.md +0 -152
  27. package/test/cypress/node_modules/arch/README.md +0 -71
  28. package/test/cypress/node_modules/asn1/README.md +0 -50
  29. package/test/cypress/node_modules/assert-plus/README.md +0 -162
  30. package/test/cypress/node_modules/astral-regex/README.md +0 -46
  31. package/test/cypress/node_modules/async/README.md +0 -60
  32. package/test/cypress/node_modules/asynckit/README.md +0 -233
  33. package/test/cypress/node_modules/at-least-node/README.md +0 -25
  34. package/test/cypress/node_modules/aws-sign2/README.md +0 -4
  35. package/test/cypress/node_modules/aws4/README.md +0 -183
  36. package/test/cypress/node_modules/balanced-match/README.md +0 -91
  37. package/test/cypress/node_modules/base64-js/README.md +0 -34
  38. package/test/cypress/node_modules/bcrypt-pbkdf/README.md +0 -45
  39. package/test/cypress/node_modules/blob-util/README.md +0 -623
  40. package/test/cypress/node_modules/bluebird/README.md +0 -57
  41. package/test/cypress/node_modules/brace-expansion/README.md +0 -129
  42. package/test/cypress/node_modules/buffer/README.md +0 -410
  43. package/test/cypress/node_modules/buffer-crc32/README.md +0 -47
  44. package/test/cypress/node_modules/cachedir/README.md +0 -27
  45. package/test/cypress/node_modules/caseless/README.md +0 -45
  46. package/test/cypress/node_modules/chalk/README.md +0 -293
  47. package/test/cypress/node_modules/chalk/node_modules/supports-color/README.md +0 -76
  48. package/test/cypress/node_modules/check-more-types/README.md +0 -952
  49. package/test/cypress/node_modules/ci-info/README.md +0 -114
  50. package/test/cypress/node_modules/clean-stack/README.md +0 -76
  51. package/test/cypress/node_modules/cli-cursor/README.md +0 -55
  52. package/test/cypress/node_modules/cli-table3/README.md +0 -218
  53. package/test/cypress/node_modules/cli-truncate/README.md +0 -139
  54. package/test/cypress/node_modules/color-convert/README.md +0 -68
  55. package/test/cypress/node_modules/color-name/README.md +0 -11
  56. package/test/cypress/node_modules/colorette/README.md +0 -102
  57. package/test/cypress/node_modules/colors/README.md +0 -221
  58. package/test/cypress/node_modules/combined-stream/README.md +0 -138
  59. package/test/cypress/node_modules/commander/README.md +0 -737
  60. package/test/cypress/node_modules/common-tags/README.md +0 -687
  61. package/test/cypress/node_modules/core-util-is/README.md +0 -3
  62. package/test/cypress/node_modules/cross-spawn/README.md +0 -96
  63. package/test/cypress/node_modules/cypress/README.md +0 -25
  64. package/test/cypress/node_modules/cypress/mount-utils/README.md +0 -14
  65. package/test/cypress/node_modules/cypress/react/README.md +0 -414
  66. package/test/cypress/node_modules/cypress/vue/README.md +0 -678
  67. package/test/cypress/node_modules/cypress/vue2/README.md +0 -693
  68. package/test/cypress/node_modules/dashdash/README.md +0 -574
  69. package/test/cypress/node_modules/dayjs/README.md +0 -128
  70. package/test/cypress/node_modules/debug/README.md +0 -455
  71. package/test/cypress/node_modules/delayed-stream/README.md +0 -141
  72. package/test/cypress/node_modules/ecc-jsbn/README.md +0 -8
  73. package/test/cypress/node_modules/emoji-regex/README.md +0 -73
  74. package/test/cypress/node_modules/end-of-stream/README.md +0 -54
  75. package/test/cypress/node_modules/enquirer/README.md +0 -1752
  76. package/test/cypress/node_modules/escape-string-regexp/README.md +0 -27
  77. package/test/cypress/node_modules/eventemitter2/README.md +0 -809
  78. package/test/cypress/node_modules/execa/README.md +0 -656
  79. package/test/cypress/node_modules/executable/README.md +0 -64
  80. package/test/cypress/node_modules/extend/README.md +0 -81
  81. package/test/cypress/node_modules/extract-zip/README.md +0 -57
  82. package/test/cypress/node_modules/extract-zip/node_modules/debug/README.md +0 -455
  83. package/test/cypress/node_modules/extsprintf/README.md +0 -46
  84. package/test/cypress/node_modules/fd-slicer/README.md +0 -199
  85. package/test/cypress/node_modules/figures/README.md +0 -139
  86. package/test/cypress/node_modules/forever-agent/README.md +0 -4
  87. package/test/cypress/node_modules/form-data/README.md +0 -234
  88. package/test/cypress/node_modules/fs-extra/README.md +0 -264
  89. package/test/cypress/node_modules/fs.realpath/README.md +0 -33
  90. package/test/cypress/node_modules/get-stream/README.md +0 -124
  91. package/test/cypress/node_modules/getos/README.md +0 -79
  92. package/test/cypress/node_modules/getpass/README.md +0 -32
  93. package/test/cypress/node_modules/glob/README.md +0 -375
  94. package/test/cypress/node_modules/global-dirs/README.md +0 -72
  95. package/test/cypress/node_modules/graceful-fs/README.md +0 -133
  96. package/test/cypress/node_modules/has-flag/README.md +0 -89
  97. package/test/cypress/node_modules/http-signature/README.md +0 -80
  98. package/test/cypress/node_modules/human-signals/README.md +0 -155
  99. package/test/cypress/node_modules/ieee754/README.md +0 -51
  100. package/test/cypress/node_modules/indent-string/README.md +0 -70
  101. package/test/cypress/node_modules/inflight/README.md +0 -37
  102. package/test/cypress/node_modules/inherits/README.md +0 -42
  103. package/test/cypress/node_modules/ini/README.md +0 -102
  104. package/test/cypress/node_modules/is-ci/README.md +0 -50
  105. package/test/cypress/node_modules/is-fullwidth-code-point/README.md +0 -39
  106. package/test/cypress/node_modules/is-installed-globally/README.md +0 -31
  107. package/test/cypress/node_modules/is-path-inside/README.md +0 -63
  108. package/test/cypress/node_modules/is-stream/README.md +0 -57
  109. package/test/cypress/node_modules/is-typedarray/README.md +0 -16
  110. package/test/cypress/node_modules/isexe/README.md +0 -51
  111. package/test/cypress/node_modules/isstream/README.md +0 -66
  112. package/test/cypress/node_modules/jsbn/README.md +0 -175
  113. package/test/cypress/node_modules/json-schema/README.md +0 -3
  114. package/test/cypress/node_modules/json-stringify-safe/README.md +0 -52
  115. package/test/cypress/node_modules/jsonfile/README.md +0 -205
  116. package/test/cypress/node_modules/jsonfile/node_modules/universalify/README.md +0 -76
  117. package/test/cypress/node_modules/jsprim/README.md +0 -287
  118. package/test/cypress/node_modules/lazy-ass/README.md +0 -269
  119. package/test/cypress/node_modules/listr2/README.md +0 -17
  120. package/test/cypress/node_modules/lodash/README.md +0 -39
  121. package/test/cypress/node_modules/lodash.once/README.md +0 -18
  122. package/test/cypress/node_modules/log-symbols/README.md +0 -51
  123. package/test/cypress/node_modules/log-update/README.md +0 -97
  124. package/test/cypress/node_modules/log-update/node_modules/slice-ansi/README.md +0 -66
  125. package/test/cypress/node_modules/log-update/node_modules/wrap-ansi/README.md +0 -97
  126. package/test/cypress/node_modules/lru-cache/README.md +0 -166
  127. package/test/cypress/node_modules/merge-stream/README.md +0 -78
  128. package/test/cypress/node_modules/mime-db/README.md +0 -102
  129. package/test/cypress/node_modules/mime-types/README.md +0 -123
  130. package/test/cypress/node_modules/mimic-fn/README.md +0 -69
  131. package/test/cypress/node_modules/minimatch/README.md +0 -209
  132. package/test/cypress/node_modules/ms/README.md +0 -60
  133. package/test/cypress/node_modules/npm-run-path/README.md +0 -115
  134. package/test/cypress/node_modules/once/README.md +0 -79
  135. package/test/cypress/node_modules/onetime/README.md +0 -94
  136. package/test/cypress/node_modules/ospath/README.md +0 -53
  137. package/test/cypress/node_modules/p-map/README.md +0 -89
  138. package/test/cypress/node_modules/path-is-absolute/README.md +0 -59
  139. package/test/cypress/node_modules/path-key/README.md +0 -61
  140. package/test/cypress/node_modules/pend/README.md +0 -41
  141. package/test/cypress/node_modules/performance-now/README.md +0 -30
  142. package/test/cypress/node_modules/pify/README.md +0 -119
  143. package/test/cypress/node_modules/pretty-bytes/README.md +0 -131
  144. package/test/cypress/node_modules/proxy-from-env/README.md +0 -131
  145. package/test/cypress/node_modules/psl/README.md +0 -215
  146. package/test/cypress/node_modules/pump/README.md +0 -65
  147. package/test/cypress/node_modules/punycode/README.md +0 -122
  148. package/test/cypress/node_modules/qs/README.md +0 -475
  149. package/test/cypress/node_modules/request-progress/README.md +0 -78
  150. package/test/cypress/node_modules/restore-cursor/README.md +0 -26
  151. package/test/cypress/node_modules/rimraf/README.md +0 -101
  152. package/test/cypress/node_modules/rxjs/README.md +0 -147
  153. package/test/cypress/node_modules/rxjs/_esm2015/README.md +0 -147
  154. package/test/cypress/node_modules/rxjs/_esm5/README.md +0 -147
  155. package/test/cypress/node_modules/rxjs/src/README.md +0 -147
  156. package/test/cypress/node_modules/safe-buffer/README.md +0 -584
  157. package/test/cypress/node_modules/safer-buffer/README.md +0 -156
  158. package/test/cypress/node_modules/semver/README.md +0 -566
  159. package/test/cypress/node_modules/shebang-command/README.md +0 -34
  160. package/test/cypress/node_modules/shebang-regex/README.md +0 -33
  161. package/test/cypress/node_modules/signal-exit/README.md +0 -39
  162. package/test/cypress/node_modules/slice-ansi/README.md +0 -72
  163. package/test/cypress/node_modules/sshpk/README.md +0 -804
  164. package/test/cypress/node_modules/string-width/README.md +0 -50
  165. package/test/cypress/node_modules/strip-ansi/README.md +0 -46
  166. package/test/cypress/node_modules/strip-final-newline/README.md +0 -30
  167. package/test/cypress/node_modules/supports-color/README.md +0 -77
  168. package/test/cypress/node_modules/throttleit/README.md +0 -32
  169. package/test/cypress/node_modules/tmp/README.md +0 -365
  170. package/test/cypress/node_modules/tough-cookie/README.md +0 -527
  171. package/test/cypress/node_modules/tslib/README.md +0 -142
  172. package/test/cypress/node_modules/tunnel-agent/README.md +0 -4
  173. package/test/cypress/node_modules/tweetnacl/README.md +0 -459
  174. package/test/cypress/node_modules/type-fest/README.md +0 -760
  175. package/test/cypress/node_modules/universalify/README.md +0 -76
  176. package/test/cypress/node_modules/untildify/README.md +0 -30
  177. package/test/cypress/node_modules/uuid/README.md +0 -505
  178. package/test/cypress/node_modules/verror/README.md +0 -528
  179. package/test/cypress/node_modules/verror/node_modules/extsprintf/README.md +0 -46
  180. package/test/cypress/node_modules/which/README.md +0 -54
  181. package/test/cypress/node_modules/wrap-ansi/README.md +0 -91
  182. package/test/cypress/node_modules/wrappy/README.md +0 -36
  183. package/test/cypress/node_modules/yallist/README.md +0 -204
  184. package/test/cypress/node_modules/yauzl/README.md +0 -658
@@ -1,459 +0,0 @@
1
- TweetNaCl.js
2
- ============
3
-
4
- Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/)
5
- to JavaScript for modern browsers and Node.js. Public domain.
6
-
7
- [![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)
8
- ](https://travis-ci.org/dchest/tweetnacl-js)
9
-
10
- Demo: <https://tweetnacl.js.org>
11
-
12
- **:warning: The library is stable and API is frozen, however it has not been
13
- independently reviewed. If you can help reviewing it, please [contact
14
- me](mailto:dmitry@codingrobots.com).**
15
-
16
- Documentation
17
- =============
18
-
19
- * [Overview](#overview)
20
- * [Installation](#installation)
21
- * [Usage](#usage)
22
- * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box)
23
- * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox)
24
- * [Scalar multiplication](#scalar-multiplication)
25
- * [Signatures](#signatures)
26
- * [Hashing](#hashing)
27
- * [Random bytes generation](#random-bytes-generation)
28
- * [Constant-time comparison](#constant-time-comparison)
29
- * [System requirements](#system-requirements)
30
- * [Development and testing](#development-and-testing)
31
- * [Benchmarks](#benchmarks)
32
- * [Contributors](#contributors)
33
- * [Who uses it](#who-uses-it)
34
-
35
-
36
- Overview
37
- --------
38
-
39
- The primary goal of this project is to produce a translation of TweetNaCl to
40
- JavaScript which is as close as possible to the original C implementation, plus
41
- a thin layer of idiomatic high-level API on top of it.
42
-
43
- There are two versions, you can use either of them:
44
-
45
- * `nacl.js` is the port of TweetNaCl with minimum differences from the
46
- original + high-level API.
47
-
48
- * `nacl-fast.js` is like `nacl.js`, but with some functions replaced with
49
- faster versions.
50
-
51
-
52
- Installation
53
- ------------
54
-
55
- You can install TweetNaCl.js via a package manager:
56
-
57
- [Bower](http://bower.io):
58
-
59
- $ bower install tweetnacl
60
-
61
- [NPM](https://www.npmjs.org/):
62
-
63
- $ npm install tweetnacl
64
-
65
- or [download source code](https://github.com/dchest/tweetnacl-js/releases).
66
-
67
-
68
- Usage
69
- -----
70
-
71
- All API functions accept and return bytes as `Uint8Array`s. If you need to
72
- encode or decode strings, use functions from
73
- <https://github.com/dchest/tweetnacl-util-js> or one of the more robust codec
74
- packages.
75
-
76
- In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you
77
- can freely pass them to TweetNaCl.js functions as arguments. The returned
78
- objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to
79
- convert them manually; make sure to convert using copying: `new Buffer(array)`,
80
- instead of sharing: `new Buffer(array.buffer)`, because some functions return
81
- subarrays of their buffers.
82
-
83
-
84
- ### Public-key authenticated encryption (box)
85
-
86
- Implements *curve25519-xsalsa20-poly1305*.
87
-
88
- #### nacl.box.keyPair()
89
-
90
- Generates a new random key pair for box and returns it as an object with
91
- `publicKey` and `secretKey` members:
92
-
93
- {
94
- publicKey: ..., // Uint8Array with 32-byte public key
95
- secretKey: ... // Uint8Array with 32-byte secret key
96
- }
97
-
98
-
99
- #### nacl.box.keyPair.fromSecretKey(secretKey)
100
-
101
- Returns a key pair for box with public key corresponding to the given secret
102
- key.
103
-
104
- #### nacl.box(message, nonce, theirPublicKey, mySecretKey)
105
-
106
- Encrypt and authenticates message using peer's public key, our secret key, and
107
- the given nonce, which must be unique for each distinct message for a key pair.
108
-
109
- Returns an encrypted and authenticated message, which is
110
- `nacl.box.overheadLength` longer than the original message.
111
-
112
- #### nacl.box.open(box, nonce, theirPublicKey, mySecretKey)
113
-
114
- Authenticates and decrypts the given box with peer's public key, our secret
115
- key, and the given nonce.
116
-
117
- Returns the original message, or `false` if authentication fails.
118
-
119
- #### nacl.box.before(theirPublicKey, mySecretKey)
120
-
121
- Returns a precomputed shared key which can be used in `nacl.box.after` and
122
- `nacl.box.open.after`.
123
-
124
- #### nacl.box.after(message, nonce, sharedKey)
125
-
126
- Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`.
127
-
128
- #### nacl.box.open.after(box, nonce, sharedKey)
129
-
130
- Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`.
131
-
132
- #### nacl.box.publicKeyLength = 32
133
-
134
- Length of public key in bytes.
135
-
136
- #### nacl.box.secretKeyLength = 32
137
-
138
- Length of secret key in bytes.
139
-
140
- #### nacl.box.sharedKeyLength = 32
141
-
142
- Length of precomputed shared key in bytes.
143
-
144
- #### nacl.box.nonceLength = 24
145
-
146
- Length of nonce in bytes.
147
-
148
- #### nacl.box.overheadLength = 16
149
-
150
- Length of overhead added to box compared to original message.
151
-
152
-
153
- ### Secret-key authenticated encryption (secretbox)
154
-
155
- Implements *xsalsa20-poly1305*.
156
-
157
- #### nacl.secretbox(message, nonce, key)
158
-
159
- Encrypt and authenticates message using the key and the nonce. The nonce must
160
- be unique for each distinct message for this key.
161
-
162
- Returns an encrypted and authenticated message, which is
163
- `nacl.secretbox.overheadLength` longer than the original message.
164
-
165
- #### nacl.secretbox.open(box, nonce, key)
166
-
167
- Authenticates and decrypts the given secret box using the key and the nonce.
168
-
169
- Returns the original message, or `false` if authentication fails.
170
-
171
- #### nacl.secretbox.keyLength = 32
172
-
173
- Length of key in bytes.
174
-
175
- #### nacl.secretbox.nonceLength = 24
176
-
177
- Length of nonce in bytes.
178
-
179
- #### nacl.secretbox.overheadLength = 16
180
-
181
- Length of overhead added to secret box compared to original message.
182
-
183
-
184
- ### Scalar multiplication
185
-
186
- Implements *curve25519*.
187
-
188
- #### nacl.scalarMult(n, p)
189
-
190
- Multiplies an integer `n` by a group element `p` and returns the resulting
191
- group element.
192
-
193
- #### nacl.scalarMult.base(n)
194
-
195
- Multiplies an integer `n` by a standard group element and returns the resulting
196
- group element.
197
-
198
- #### nacl.scalarMult.scalarLength = 32
199
-
200
- Length of scalar in bytes.
201
-
202
- #### nacl.scalarMult.groupElementLength = 32
203
-
204
- Length of group element in bytes.
205
-
206
-
207
- ### Signatures
208
-
209
- Implements [ed25519](http://ed25519.cr.yp.to).
210
-
211
- #### nacl.sign.keyPair()
212
-
213
- Generates new random key pair for signing and returns it as an object with
214
- `publicKey` and `secretKey` members:
215
-
216
- {
217
- publicKey: ..., // Uint8Array with 32-byte public key
218
- secretKey: ... // Uint8Array with 64-byte secret key
219
- }
220
-
221
- #### nacl.sign.keyPair.fromSecretKey(secretKey)
222
-
223
- Returns a signing key pair with public key corresponding to the given
224
- 64-byte secret key. The secret key must have been generated by
225
- `nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`.
226
-
227
- #### nacl.sign.keyPair.fromSeed(seed)
228
-
229
- Returns a new signing key pair generated deterministically from a 32-byte seed.
230
- The seed must contain enough entropy to be secure. This method is not
231
- recommended for general use: instead, use `nacl.sign.keyPair` to generate a new
232
- key pair from a random seed.
233
-
234
- #### nacl.sign(message, secretKey)
235
-
236
- Signs the message using the secret key and returns a signed message.
237
-
238
- #### nacl.sign.open(signedMessage, publicKey)
239
-
240
- Verifies the signed message and returns the message without signature.
241
-
242
- Returns `null` if verification failed.
243
-
244
- #### nacl.sign.detached(message, secretKey)
245
-
246
- Signs the message using the secret key and returns a signature.
247
-
248
- #### nacl.sign.detached.verify(message, signature, publicKey)
249
-
250
- Verifies the signature for the message and returns `true` if verification
251
- succeeded or `false` if it failed.
252
-
253
- #### nacl.sign.publicKeyLength = 32
254
-
255
- Length of signing public key in bytes.
256
-
257
- #### nacl.sign.secretKeyLength = 64
258
-
259
- Length of signing secret key in bytes.
260
-
261
- #### nacl.sign.seedLength = 32
262
-
263
- Length of seed for `nacl.sign.keyPair.fromSeed` in bytes.
264
-
265
- #### nacl.sign.signatureLength = 64
266
-
267
- Length of signature in bytes.
268
-
269
-
270
- ### Hashing
271
-
272
- Implements *SHA-512*.
273
-
274
- #### nacl.hash(message)
275
-
276
- Returns SHA-512 hash of the message.
277
-
278
- #### nacl.hash.hashLength = 64
279
-
280
- Length of hash in bytes.
281
-
282
-
283
- ### Random bytes generation
284
-
285
- #### nacl.randomBytes(length)
286
-
287
- Returns a `Uint8Array` of the given length containing random bytes of
288
- cryptographic quality.
289
-
290
- **Implementation note**
291
-
292
- TweetNaCl.js uses the following methods to generate random bytes,
293
- depending on the platform it runs on:
294
-
295
- * `window.crypto.getRandomValues` (WebCrypto standard)
296
- * `window.msCrypto.getRandomValues` (Internet Explorer 11)
297
- * `crypto.randomBytes` (Node.js)
298
-
299
- If the platform doesn't provide a suitable PRNG, the following functions,
300
- which require random numbers, will throw exception:
301
-
302
- * `nacl.randomBytes`
303
- * `nacl.box.keyPair`
304
- * `nacl.sign.keyPair`
305
-
306
- Other functions are deterministic and will continue working.
307
-
308
- If a platform you are targeting doesn't implement secure random number
309
- generator, but you somehow have a cryptographically-strong source of entropy
310
- (not `Math.random`!), and you know what you are doing, you can plug it into
311
- TweetNaCl.js like this:
312
-
313
- nacl.setPRNG(function(x, n) {
314
- // ... copy n random bytes into x ...
315
- });
316
-
317
- Note that `nacl.setPRNG` *completely replaces* internal random byte generator
318
- with the one provided.
319
-
320
-
321
- ### Constant-time comparison
322
-
323
- #### nacl.verify(x, y)
324
-
325
- Compares `x` and `y` in constant time and returns `true` if their lengths are
326
- non-zero and equal, and their contents are equal.
327
-
328
- Returns `false` if either of the arguments has zero length, or arguments have
329
- different lengths, or their contents differ.
330
-
331
-
332
- System requirements
333
- -------------------
334
-
335
- TweetNaCl.js supports modern browsers that have a cryptographically secure
336
- pseudorandom number generator and typed arrays, including the latest versions
337
- of:
338
-
339
- * Chrome
340
- * Firefox
341
- * Safari (Mac, iOS)
342
- * Internet Explorer 11
343
-
344
- Other systems:
345
-
346
- * Node.js
347
-
348
-
349
- Development and testing
350
- ------------------------
351
-
352
- Install NPM modules needed for development:
353
-
354
- $ npm install
355
-
356
- To build minified versions:
357
-
358
- $ npm run build
359
-
360
- Tests use minified version, so make sure to rebuild it every time you change
361
- `nacl.js` or `nacl-fast.js`.
362
-
363
- ### Testing
364
-
365
- To run tests in Node.js:
366
-
367
- $ npm run test-node
368
-
369
- By default all tests described here work on `nacl.min.js`. To test other
370
- versions, set environment variable `NACL_SRC` to the file name you want to test.
371
- For example, the following command will test fast minified version:
372
-
373
- $ NACL_SRC=nacl-fast.min.js npm run test-node
374
-
375
- To run full suite of tests in Node.js, including comparing outputs of
376
- JavaScript port to outputs of the original C version:
377
-
378
- $ npm run test-node-all
379
-
380
- To prepare tests for browsers:
381
-
382
- $ npm run build-test-browser
383
-
384
- and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
385
- run them.
386
-
387
- To run headless browser tests with `tape-run` (powered by Electron):
388
-
389
- $ npm run test-browser
390
-
391
- (If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
392
-
393
- To run tests in both Node and Electron:
394
-
395
- $ npm test
396
-
397
- ### Benchmarking
398
-
399
- To run benchmarks in Node.js:
400
-
401
- $ npm run bench
402
- $ NACL_SRC=nacl-fast.min.js npm run bench
403
-
404
- To run benchmarks in a browser, open `test/benchmark/bench.html` (or
405
- `test/benchmark/bench-fast.html`).
406
-
407
-
408
- Benchmarks
409
- ----------
410
-
411
- For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014)
412
- laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi
413
- Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in
414
- Chrome 52/Android:
415
-
416
- | | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM |
417
- | ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:|
418
- | salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s |
419
- | poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s |
420
- | hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s |
421
- | secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s |
422
- | box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s |
423
- | scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s |
424
- | sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s |
425
- | sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s |
426
-
427
- (You can run benchmarks on your devices by clicking on the links at the bottom
428
- of the [home page](https://tweetnacl.js.org)).
429
-
430
- In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and
431
- authenticate more than 57000 messages per second on a typical laptop or more than
432
- 14000 messages per second on a $170 smartphone, sign about 200 and verify 100
433
- messages per second on a laptop or 60 and 30 messages per second on a smartphone,
434
- per CPU core (with Web Workers you can do these operations in parallel),
435
- which is good enough for most applications.
436
-
437
-
438
- Contributors
439
- ------------
440
-
441
- See AUTHORS.md file.
442
-
443
-
444
- Third-party libraries based on TweetNaCl.js
445
- -------------------------------------------
446
-
447
- * [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation
448
- * [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption
449
- * [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html)
450
- * [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules
451
-
452
-
453
- Who uses it
454
- -----------
455
-
456
- Some notable users of TweetNaCl.js:
457
-
458
- * [miniLock](http://minilock.io/)
459
- * [Stellar](https://www.stellar.org/)