quarkdash 1.0.2 → 1.0.7

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 (49) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/crypto.js +2 -2
  3. package/dist/cjs/crypto.js.map +1 -1
  4. package/dist/cjs/index.js +2 -0
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/ringlwe.js +23 -6
  7. package/dist/cjs/ringlwe.js.map +1 -1
  8. package/dist/cjs/sha.js +242 -0
  9. package/dist/cjs/sha.js.map +1 -0
  10. package/dist/esm/crypto.js +2 -2
  11. package/dist/esm/crypto.js.map +1 -1
  12. package/dist/esm/index.js +2 -0
  13. package/dist/esm/index.js.map +1 -1
  14. package/dist/esm/ringlwe.js +23 -6
  15. package/dist/esm/ringlwe.js.map +1 -1
  16. package/dist/esm/sha.js +237 -0
  17. package/dist/esm/sha.js.map +1 -0
  18. package/dist/types/index.d.ts +1 -0
  19. package/dist/types/ringlwe.d.ts +13 -2
  20. package/dist/types/sha.d.ts +49 -0
  21. package/dist/types/types.d.ts +2 -2
  22. package/package.json +1 -1
  23. package/src/crypto.ts +2 -2
  24. package/src/index.ts +3 -0
  25. package/src/ringlwe.ts +30 -12
  26. package/src/sha.ts +265 -0
  27. package/src/types.ts +2 -2
  28. package/.idea/modules.xml +0 -8
  29. package/.idea/quarkdash.iml +0 -12
  30. package/.idea/vcs.xml +0 -6
  31. package/coverage/clover.xml +0 -506
  32. package/coverage/coverage-final.json +0 -9
  33. package/coverage/lcov-report/base.css +0 -224
  34. package/coverage/lcov-report/block-navigation.js +0 -87
  35. package/coverage/lcov-report/cipher.ts.html +0 -862
  36. package/coverage/lcov-report/crypto.ts.html +0 -1000
  37. package/coverage/lcov-report/favicon.png +0 -0
  38. package/coverage/lcov-report/index.html +0 -221
  39. package/coverage/lcov-report/index.ts.html +0 -154
  40. package/coverage/lcov-report/kdf.ts.html +0 -274
  41. package/coverage/lcov-report/mac.ts.html +0 -277
  42. package/coverage/lcov-report/prettify.css +0 -1
  43. package/coverage/lcov-report/prettify.js +0 -2
  44. package/coverage/lcov-report/ringlwe.ts.html +0 -895
  45. package/coverage/lcov-report/shake.ts.html +0 -571
  46. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  47. package/coverage/lcov-report/sorter.js +0 -210
  48. package/coverage/lcov-report/utils.ts.html +0 -952
  49. package/coverage/lcov.info +0 -796
@@ -1,87 +0,0 @@
1
- /* eslint-disable */
2
- var jumpToCode = (function init() {
3
- // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
-
6
- // Elements to highlight in the file listing view
7
- var fileListingElements = ['td.pct.low'];
8
-
9
- // We don't want to select elements that are direct descendants of another match
10
- var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
-
12
- // Selector that finds elements on the page to which we can jump
13
- var selector =
14
- fileListingElements.join(', ') +
15
- ', ' +
16
- notSelector +
17
- missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
-
19
- // The NodeList of matching elements
20
- var missingCoverageElements = document.querySelectorAll(selector);
21
-
22
- var currentIndex;
23
-
24
- function toggleClass(index) {
25
- missingCoverageElements
26
- .item(currentIndex)
27
- .classList.remove('highlighted');
28
- missingCoverageElements.item(index).classList.add('highlighted');
29
- }
30
-
31
- function makeCurrent(index) {
32
- toggleClass(index);
33
- currentIndex = index;
34
- missingCoverageElements.item(index).scrollIntoView({
35
- behavior: 'smooth',
36
- block: 'center',
37
- inline: 'center'
38
- });
39
- }
40
-
41
- function goToPrevious() {
42
- var nextIndex = 0;
43
- if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
- nextIndex = missingCoverageElements.length - 1;
45
- } else if (missingCoverageElements.length > 1) {
46
- nextIndex = currentIndex - 1;
47
- }
48
-
49
- makeCurrent(nextIndex);
50
- }
51
-
52
- function goToNext() {
53
- var nextIndex = 0;
54
-
55
- if (
56
- typeof currentIndex === 'number' &&
57
- currentIndex < missingCoverageElements.length - 1
58
- ) {
59
- nextIndex = currentIndex + 1;
60
- }
61
-
62
- makeCurrent(nextIndex);
63
- }
64
-
65
- return function jump(event) {
66
- if (
67
- document.getElementById('fileSearch') === document.activeElement &&
68
- document.activeElement != null
69
- ) {
70
- // if we're currently focused on the search input, we don't want to navigate
71
- return;
72
- }
73
-
74
- switch (event.which) {
75
- case 78: // n
76
- case 74: // j
77
- goToNext();
78
- break;
79
- case 66: // b
80
- case 75: // k
81
- case 80: // p
82
- goToPrevious();
83
- break;
84
- }
85
- };
86
- })();
87
- window.addEventListener('keydown', jumpToCode);