@gardenfi/utils 2.4.3 → 2.4.4
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.
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +4 -4
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +6 -6
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +35 -50
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +9 -16
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +7 -9
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +26 -5
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +10 -14
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +14 -3
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +116 -25
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +81 -4
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +177 -6
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +5 -87
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +13 -125
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +12 -6
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +94 -20
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +74 -16
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +88 -39
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +137 -20
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +68 -10
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +23 -6
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +106 -103
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +7 -3
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +51 -4
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +17 -9
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +11 -2
- package/dist/index124.cjs +1 -2
- package/dist/index124.js +6 -3
- package/dist/index125.cjs +1 -20
- package/dist/index125.js +14 -326
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +3 -13
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +26 -4
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +5 -2
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +6 -7
- package/dist/index130.cjs +1 -3
- package/dist/index130.js +84 -211
- package/dist/index131.cjs +1 -1
- package/dist/index131.js +124 -30
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +7 -21
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +21 -5
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +17 -73
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +40 -5
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +21 -5
- package/dist/index137.cjs +1 -9
- package/dist/index137.js +11 -35
- package/dist/index138.cjs +1 -3
- package/dist/index138.js +6 -110
- package/dist/index139.cjs +1 -1
- package/dist/index139.js +107 -3
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +3 -24
- package/dist/index141.cjs +1 -3
- package/dist/index141.js +4 -452
- package/dist/index142.cjs +1 -2
- package/dist/index142.js +9 -55
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +2 -27
- package/dist/index144.cjs +2 -1
- package/dist/index144.js +3 -34
- package/dist/index145.cjs +20 -1
- package/dist/index145.js +320 -29
- package/dist/index146.cjs +1 -4
- package/dist/index146.js +11 -192
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +4 -8
- package/dist/index148.cjs +1 -1
- package/dist/index148.js +2 -13
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +6 -17
- package/dist/index150.cjs +3 -1
- package/dist/index150.js +207 -19
- package/dist/index151.cjs +1 -1
- package/dist/index151.js +32 -9
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +21 -55
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +5 -45
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +73 -8
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +5 -7
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +5 -16
- package/dist/index157.cjs +9 -1
- package/dist/index157.js +33 -16
- package/dist/index158.cjs +3 -1
- package/dist/index158.js +110 -21
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +3 -52
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +4 -4
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +23 -11
- package/dist/index161.cjs +3 -1
- package/dist/index161.js +451 -161
- package/dist/index162.cjs +2 -1
- package/dist/index162.js +53 -20
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +25 -126
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +28 -33
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +35 -6
- package/dist/index166.cjs +4 -1
- package/dist/index166.js +194 -27
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +6 -189
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +19 -4
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +23 -60
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +9 -3
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +7 -20
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +16 -16
- package/dist/index173.cjs +1 -1
- package/dist/index173.js +18 -23
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +21 -11
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +50 -33
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +12 -3
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +161 -18
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +126 -26
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +37 -35
- package/dist/index180.cjs +1 -1
- package/dist/index180.js +6 -10
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +27 -25
- package/dist/index182.cjs +1 -1
- package/dist/index182.js +190 -27
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +4 -66
- package/dist/index184.cjs +1 -1
- package/dist/index184.js +64 -9
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +3 -34
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +20 -24
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +16 -24
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +23 -3
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +34 -14
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +8 -8
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +3 -104
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +18 -80
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +27 -5
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +36 -6
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +10 -27
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +25 -39
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +28 -13
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +62 -39
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +9 -5
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +24 -11
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +24 -19
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +3 -78
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +15 -2
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +76 -33
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +5 -111
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +26 -48
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +40 -30
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +5 -8
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +11 -6
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +19 -6
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +2 -2
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +78 -11
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +2 -11
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +36 -12
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +107 -28
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +50 -5
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +32 -7
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +8 -8
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +6 -20
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +6 -31
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +11 -20
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +10 -3
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +13 -17
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +32 -10
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +5 -22
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +7 -22
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +8 -5
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +20 -5
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +31 -8
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +20 -104
- package/dist/index229.cjs +1 -1
- package/dist/index229.js +4 -3
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +9 -9
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +17 -18
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +9 -170
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +20 -16
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +22 -10
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +5 -16
- package/dist/index235.cjs +1 -1
- package/dist/index235.js +8 -22
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +103 -29
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +3 -2
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +18 -13
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +16 -11
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +13 -31
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +10 -47
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +15 -10
- package/dist/index242.cjs +1 -1
- package/dist/index242.js +22 -7
- package/dist/index243.cjs +1 -1
- package/dist/index243.js +30 -9
- package/dist/index244.cjs +1 -1
- package/dist/index244.js +2 -14
- package/dist/index245.cjs +1 -1
- package/dist/index245.js +13 -14
- package/dist/index246.cjs +1 -1
- package/dist/index246.js +12 -9
- package/dist/index247.cjs +1 -1
- package/dist/index247.js +47 -24
- package/dist/index248.cjs +1 -1
- package/dist/index248.js +11 -12
- package/dist/index249.cjs +1 -1
- package/dist/index249.js +7 -24
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +58 -32
- package/dist/index250.cjs +1 -1
- package/dist/index250.js +8 -12
- package/dist/index251.cjs +1 -1
- package/dist/index251.js +13 -15
- package/dist/index252.cjs +1 -2
- package/dist/index252.js +12 -22
- package/dist/index253.cjs +1 -1
- package/dist/index253.js +9 -52
- package/dist/index254.cjs +1 -1
- package/dist/index254.js +24 -25
- package/dist/index255.cjs +1 -1
- package/dist/index255.js +12 -13
- package/dist/index256.cjs +1 -1
- package/dist/index256.js +24 -15
- package/dist/index257.cjs +1 -1
- package/dist/index257.js +13 -5
- package/dist/index258.cjs +1 -1
- package/dist/index258.js +15 -13
- package/dist/index259.cjs +2 -1
- package/dist/index259.js +24 -10
- package/dist/index26.cjs +16 -1
- package/dist/index26.js +113 -11
- package/dist/index260.cjs +1 -1
- package/dist/index260.js +52 -16
- package/dist/index261.cjs +1 -1
- package/dist/index261.js +222 -101
- package/dist/index262.cjs +1 -1
- package/dist/index262.js +138 -5
- package/dist/index263.cjs +1 -1
- package/dist/index263.js +141 -219
- package/dist/index264.cjs +1 -1
- package/dist/index264.js +103 -6
- package/dist/index265.cjs +1 -1
- package/dist/index265.js +7 -7
- package/dist/index266.cjs +1 -1
- package/dist/index266.js +41 -25
- package/dist/index267.cjs +1 -1
- package/dist/index267.js +78 -5
- package/dist/index268.cjs +1 -2
- package/dist/index268.js +2 -42
- package/dist/index269.cjs +2 -1
- package/dist/index269.js +42 -2
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +32 -58
- package/dist/index270.cjs +1 -1
- package/dist/index270.js +2 -11
- package/dist/index271.cjs +1 -1
- package/dist/index271.js +5 -19
- package/dist/index272.cjs +1 -1
- package/dist/index272.js +10 -8
- package/dist/index273.cjs +1 -1
- package/dist/index273.js +19 -66
- package/dist/index274.cjs +1 -1
- package/dist/index274.js +8 -65
- package/dist/index275.cjs +1 -1
- package/dist/index275.js +56 -176
- package/dist/index276.cjs +1 -1
- package/dist/index276.js +63 -20
- package/dist/index277.cjs +1 -1
- package/dist/index277.js +181 -37
- package/dist/index278.cjs +1 -1
- package/dist/index278.js +21 -75
- package/dist/index279.cjs +1 -1
- package/dist/index279.js +22 -20
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +31 -13
- package/dist/index280.cjs +1 -1
- package/dist/index280.js +69 -9
- package/dist/index281.cjs +1 -1
- package/dist/index281.js +34 -7
- package/dist/index282.cjs +1 -1
- package/dist/index282.js +16 -12
- package/dist/index283.cjs +1 -2
- package/dist/index283.js +13 -18
- package/dist/index284.cjs +1 -1
- package/dist/index284.js +12 -14
- package/dist/index285.cjs +2 -1
- package/dist/index285.js +18 -11
- package/dist/index286.cjs +1 -1
- package/dist/index286.js +13 -18
- package/dist/index287.cjs +1 -1
- package/dist/index287.js +11 -146
- package/dist/index288.cjs +1 -1
- package/dist/index288.js +6 -3
- package/dist/index289.cjs +1 -1
- package/dist/index289.js +7 -141
- package/dist/index29.cjs +1 -16
- package/dist/index29.js +11 -113
- package/dist/index290.cjs +1 -1
- package/dist/index290.js +26 -155
- package/dist/index291.cjs +1 -1
- package/dist/index291.js +19 -9
- package/dist/index292.cjs +1 -1
- package/dist/index292.js +3 -113
- package/dist/index293.cjs +1 -2
- package/dist/index293.js +128 -122
- package/dist/index294.cjs +1 -1
- package/dist/index294.js +152 -8
- package/dist/index295.cjs +1 -1
- package/dist/index295.js +9 -19
- package/dist/index296.cjs +1 -1
- package/dist/index296.js +104 -130
- package/dist/index297.cjs +2 -1
- package/dist/index297.js +127 -35
- package/dist/index298.cjs +1 -1
- package/dist/index298.js +10 -77
- package/dist/index299.cjs +1 -1
- package/dist/index299.js +20 -2
- package/dist/index300.cjs +1 -1
- package/dist/index300.js +4 -4
- package/dist/index301.cjs +1 -1
- package/dist/index301.js +2 -2
- package/dist/index303.cjs +1 -1
- package/dist/index303.js +1 -1
- package/dist/index305.cjs +1 -1
- package/dist/index305.js +1 -1
- package/dist/index306.cjs +1 -1
- package/dist/index306.js +3 -3
- package/dist/index308.cjs +1 -1
- package/dist/index308.js +2 -2
- package/dist/index310.cjs +1 -1
- package/dist/index310.js +2 -2
- package/dist/index311.cjs +1 -1
- package/dist/index311.js +4 -63
- package/dist/index312.cjs +1 -1
- package/dist/index312.js +59 -40
- package/dist/index313.cjs +1 -1
- package/dist/index313.js +5 -5
- package/dist/index314.cjs +1 -1
- package/dist/index314.js +45 -5
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +39 -7
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +45 -31
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +24 -28
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +6 -16
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +13 -33
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +15 -44
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +5 -151
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +12 -34
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +9 -37
- package/dist/index41.cjs +1 -2
- package/dist/index41.js +11 -58
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +11 -37
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +13 -15
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +33 -8
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +56 -2
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +16 -45
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +5 -31
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +8 -3
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +170 -8
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +99 -64
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +3 -9
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +21 -28
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +7 -71
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +29 -17
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +29 -110
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +16 -60
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +29 -20
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +41 -37
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +149 -35
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +31 -54
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +33 -161
- package/dist/index62.cjs +2 -1
- package/dist/index62.js +58 -39
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +37 -9
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +15 -36
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +8 -9
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +2 -51
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +42 -82
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +30 -40
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +9 -8
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +68 -6
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +9 -17
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +28 -8
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +71 -13
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +19 -7
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +110 -9
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +57 -43
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +24 -13
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +40 -16
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +37 -13
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +58 -6
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +164 -33
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +40 -9
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +8 -7
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +36 -26
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +9 -10
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +50 -14
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +81 -113
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +37 -77
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +8 -177
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +5 -5
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +17 -13
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +8 -13
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +13 -95
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +7 -75
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +9 -89
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +45 -137
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +13 -69
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +15 -22
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +13 -109
- package/package.json +1 -1
package/dist/index263.js
CHANGED
|
@@ -1,227 +1,149 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { crypto as u } from "./index268.js";
|
|
2
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3
|
+
function w(t) {
|
|
4
|
+
return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
|
|
5
|
+
}
|
|
6
|
+
function l(t) {
|
|
7
|
+
if (!Number.isSafeInteger(t) || t < 0)
|
|
8
|
+
throw new Error("positive integer expected, got " + t);
|
|
9
|
+
}
|
|
10
|
+
function c(t, ...e) {
|
|
11
|
+
if (!w(t))
|
|
12
|
+
throw new Error("Uint8Array expected");
|
|
13
|
+
if (e.length > 0 && !e.includes(t.length))
|
|
14
|
+
throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
|
|
15
|
+
}
|
|
16
|
+
function U(t) {
|
|
17
|
+
if (typeof t != "function" || typeof t.create != "function")
|
|
18
|
+
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
19
|
+
l(t.outputLen), l(t.blockLen);
|
|
20
|
+
}
|
|
21
|
+
function B(t, e = !0) {
|
|
22
|
+
if (t.destroyed)
|
|
23
|
+
throw new Error("Hash instance has been destroyed");
|
|
24
|
+
if (e && t.finished)
|
|
25
|
+
throw new Error("Hash#digest() has already been called");
|
|
26
|
+
}
|
|
27
|
+
function H(t, e) {
|
|
28
|
+
c(t);
|
|
29
|
+
const n = e.outputLen;
|
|
30
|
+
if (t.length < n)
|
|
31
|
+
throw new Error("digestInto() expects output buffer of length at least " + n);
|
|
32
|
+
}
|
|
33
|
+
function L(t) {
|
|
34
|
+
return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
|
|
35
|
+
}
|
|
36
|
+
function V(...t) {
|
|
37
|
+
for (let e = 0; e < t.length; e++)
|
|
38
|
+
t[e].fill(0);
|
|
39
|
+
}
|
|
40
|
+
function _(t) {
|
|
41
|
+
return new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
42
|
+
}
|
|
43
|
+
function S(t, e) {
|
|
44
|
+
return t << 32 - e | t >>> e;
|
|
45
|
+
}
|
|
46
|
+
const d = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
47
|
+
function h(t) {
|
|
48
|
+
return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
|
|
49
|
+
}
|
|
50
|
+
function x(t) {
|
|
51
|
+
for (let e = 0; e < t.length; e++)
|
|
52
|
+
t[e] = h(t[e]);
|
|
53
|
+
return t;
|
|
54
|
+
}
|
|
55
|
+
const T = d ? (t) => t : x, p = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", A = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
|
56
|
+
function k(t) {
|
|
57
|
+
if (c(t), p)
|
|
58
|
+
return t.toHex();
|
|
59
|
+
let e = "";
|
|
60
|
+
for (let n = 0; n < t.length; n++)
|
|
61
|
+
e += A[t[n]];
|
|
62
|
+
return e;
|
|
63
|
+
}
|
|
64
|
+
const f = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
65
|
+
function y(t) {
|
|
66
|
+
if (t >= f._0 && t <= f._9)
|
|
67
|
+
return t - f._0;
|
|
68
|
+
if (t >= f.A && t <= f.F)
|
|
69
|
+
return t - (f.A - 10);
|
|
70
|
+
if (t >= f.a && t <= f.f)
|
|
71
|
+
return t - (f.a - 10);
|
|
72
|
+
}
|
|
73
|
+
function I(t) {
|
|
74
|
+
if (typeof t != "string")
|
|
75
|
+
throw new Error("hex string expected, got " + typeof t);
|
|
76
|
+
if (p)
|
|
77
|
+
return Uint8Array.fromHex(t);
|
|
78
|
+
const e = t.length, n = e / 2;
|
|
79
|
+
if (e % 2)
|
|
80
|
+
throw new Error("hex string expected, got unpadded hex of length " + e);
|
|
81
|
+
const r = new Uint8Array(n);
|
|
82
|
+
for (let o = 0, i = 0; o < n; o++, i += 2) {
|
|
83
|
+
const s = y(t.charCodeAt(i)), a = y(t.charCodeAt(i + 1));
|
|
84
|
+
if (s === void 0 || a === void 0) {
|
|
85
|
+
const g = t[i] + t[i + 1];
|
|
86
|
+
throw new Error('hex string expected, got non-hex character "' + g + '" at index ' + i);
|
|
87
|
+
}
|
|
88
|
+
r[o] = s * 16 + a;
|
|
89
|
+
}
|
|
13
90
|
return r;
|
|
14
91
|
}
|
|
15
|
-
function
|
|
16
|
-
if (t
|
|
17
|
-
throw new Error("
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
92
|
+
function m(t) {
|
|
93
|
+
if (typeof t != "string")
|
|
94
|
+
throw new Error("string expected");
|
|
95
|
+
return new Uint8Array(new TextEncoder().encode(t));
|
|
96
|
+
}
|
|
97
|
+
function b(t) {
|
|
98
|
+
return typeof t == "string" && (t = m(t)), c(t), t;
|
|
99
|
+
}
|
|
100
|
+
function R(...t) {
|
|
101
|
+
let e = 0;
|
|
102
|
+
for (let r = 0; r < t.length; r++) {
|
|
103
|
+
const o = t[r];
|
|
104
|
+
c(o), e += o.length;
|
|
24
105
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (!t.eql(t.sqr(r), n))
|
|
32
|
-
throw new Error("Cannot find square root");
|
|
33
|
-
return r;
|
|
106
|
+
const n = new Uint8Array(e);
|
|
107
|
+
for (let r = 0, o = 0; r < t.length; r++) {
|
|
108
|
+
const i = t[r];
|
|
109
|
+
n.set(i, o), o += i.length;
|
|
110
|
+
}
|
|
111
|
+
return n;
|
|
34
112
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
function K(t) {
|
|
42
|
-
if (t < BigInt(3))
|
|
43
|
-
throw new Error("sqrt is not defined for small field");
|
|
44
|
-
let n = t - d, o = 0;
|
|
45
|
-
for (; n % q === g; )
|
|
46
|
-
n /= q, o++;
|
|
47
|
-
let r = q;
|
|
48
|
-
const s = U(t);
|
|
49
|
-
for (; N(s, r) === 1; )
|
|
50
|
-
if (r++ > 1e3)
|
|
51
|
-
throw new Error("Cannot find square root: probably non-prime P");
|
|
52
|
-
if (o === 1)
|
|
53
|
-
return M;
|
|
54
|
-
let f = s.pow(r, n);
|
|
55
|
-
const c = (n + d) / q;
|
|
56
|
-
return function(i, w) {
|
|
57
|
-
if (i.is0(w))
|
|
58
|
-
return w;
|
|
59
|
-
if (N(i, w) !== 1)
|
|
60
|
-
throw new Error("Cannot find square root");
|
|
61
|
-
let e = o, l = i.mul(i.ONE, f), a = i.pow(w, n), b = i.pow(w, c);
|
|
62
|
-
for (; !i.eql(a, i.ONE); ) {
|
|
63
|
-
if (i.is0(a))
|
|
64
|
-
return i.ZERO;
|
|
65
|
-
let m = 1, E = i.sqr(a);
|
|
66
|
-
for (; !i.eql(E, i.ONE); )
|
|
67
|
-
if (m++, E = i.sqr(E), m === e)
|
|
68
|
-
throw new Error("Cannot find square root");
|
|
69
|
-
const C = d << BigInt(e - m - 1), v = i.pow(l, C);
|
|
70
|
-
e = m, l = i.sqr(v), a = i.mul(a, l), b = i.mul(b, v);
|
|
71
|
-
}
|
|
72
|
-
return b;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function Q(t) {
|
|
76
|
-
return t % x === V ? M : t % L === T ? H : K(t);
|
|
77
|
-
}
|
|
78
|
-
const Y = [
|
|
79
|
-
"create",
|
|
80
|
-
"isValid",
|
|
81
|
-
"is0",
|
|
82
|
-
"neg",
|
|
83
|
-
"inv",
|
|
84
|
-
"sqrt",
|
|
85
|
-
"sqr",
|
|
86
|
-
"eql",
|
|
87
|
-
"add",
|
|
88
|
-
"sub",
|
|
89
|
-
"mul",
|
|
90
|
-
"pow",
|
|
91
|
-
"div",
|
|
92
|
-
"addN",
|
|
93
|
-
"subN",
|
|
94
|
-
"mulN",
|
|
95
|
-
"sqrN"
|
|
96
|
-
];
|
|
97
|
-
function P(t) {
|
|
98
|
-
const n = {
|
|
99
|
-
ORDER: "bigint",
|
|
100
|
-
MASK: "bigint",
|
|
101
|
-
BYTES: "number",
|
|
102
|
-
BITS: "number"
|
|
103
|
-
}, o = Y.reduce((r, s) => (r[s] = "function", r), n);
|
|
104
|
-
return j(t, o), t;
|
|
105
|
-
}
|
|
106
|
-
function k(t, n, o) {
|
|
107
|
-
if (o < g)
|
|
108
|
-
throw new Error("invalid exponent, negatives unsupported");
|
|
109
|
-
if (o === g)
|
|
110
|
-
return t.ONE;
|
|
111
|
-
if (o === d)
|
|
112
|
-
return n;
|
|
113
|
-
let r = t.ONE, s = n;
|
|
114
|
-
for (; o > g; )
|
|
115
|
-
o & d && (r = t.mul(r, s)), s = t.sqr(s), o >>= d;
|
|
116
|
-
return r;
|
|
113
|
+
class F {
|
|
114
|
+
}
|
|
115
|
+
function O(t) {
|
|
116
|
+
const e = (r) => t().update(b(r)).digest(), n = t();
|
|
117
|
+
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (!s && !f && !c)
|
|
125
|
-
throw new Error("invalid Legendre symbol result");
|
|
126
|
-
return s ? 1 : f ? 0 : -1;
|
|
127
|
-
}
|
|
128
|
-
function J(t, n) {
|
|
129
|
-
n !== void 0 && z(n);
|
|
130
|
-
const o = n !== void 0 ? n : t.toString(2).length, r = Math.ceil(o / 8);
|
|
131
|
-
return { nBitLength: o, nByteLength: r };
|
|
132
|
-
}
|
|
133
|
-
function U(t, n, o = !1, r = {}) {
|
|
134
|
-
if (t <= g)
|
|
135
|
-
throw new Error("invalid field: expected ORDER > 0, got " + t);
|
|
136
|
-
let s, f;
|
|
137
|
-
if (typeof n == "object" && n != null) {
|
|
138
|
-
if (r.sqrt || o)
|
|
139
|
-
throw new Error("cannot specify opts in two arguments");
|
|
140
|
-
const e = n;
|
|
141
|
-
e.BITS && (s = e.BITS), e.sqrt && (f = e.sqrt), typeof e.isLE == "boolean" && (o = e.isLE);
|
|
142
|
-
} else
|
|
143
|
-
typeof n == "number" && (s = n), r.sqrt && (f = r.sqrt);
|
|
144
|
-
const { nBitLength: c, nByteLength: u } = J(t, s);
|
|
145
|
-
if (u > 2048)
|
|
146
|
-
throw new Error("invalid field: expected ORDER of <= 2048 bytes");
|
|
147
|
-
let i;
|
|
148
|
-
const w = Object.freeze({
|
|
149
|
-
ORDER: t,
|
|
150
|
-
isLE: o,
|
|
151
|
-
BITS: c,
|
|
152
|
-
BYTES: u,
|
|
153
|
-
MASK: Z(c),
|
|
154
|
-
ZERO: g,
|
|
155
|
-
ONE: d,
|
|
156
|
-
create: (e) => h(e, t),
|
|
157
|
-
isValid: (e) => {
|
|
158
|
-
if (typeof e != "bigint")
|
|
159
|
-
throw new Error("invalid field element: expected bigint, got " + typeof e);
|
|
160
|
-
return g <= e && e < t;
|
|
161
|
-
},
|
|
162
|
-
is0: (e) => e === g,
|
|
163
|
-
// is valid and invertible
|
|
164
|
-
isValidNot0: (e) => !w.is0(e) && w.isValid(e),
|
|
165
|
-
isOdd: (e) => (e & d) === d,
|
|
166
|
-
neg: (e) => h(-e, t),
|
|
167
|
-
eql: (e, l) => e === l,
|
|
168
|
-
sqr: (e) => h(e * e, t),
|
|
169
|
-
add: (e, l) => h(e + l, t),
|
|
170
|
-
sub: (e, l) => h(e - l, t),
|
|
171
|
-
mul: (e, l) => h(e * l, t),
|
|
172
|
-
pow: (e, l) => k(w, e, l),
|
|
173
|
-
div: (e, l) => h(e * B(l, t), t),
|
|
174
|
-
// Same as above, but doesn't normalize
|
|
175
|
-
sqrN: (e) => e * e,
|
|
176
|
-
addN: (e, l) => e + l,
|
|
177
|
-
subN: (e, l) => e - l,
|
|
178
|
-
mulN: (e, l) => e * l,
|
|
179
|
-
inv: (e) => B(e, t),
|
|
180
|
-
sqrt: f || ((e) => (i || (i = Q(t)), i(w, e))),
|
|
181
|
-
toBytes: (e) => o ? y(e, u) : I(e, u),
|
|
182
|
-
fromBytes: (e) => {
|
|
183
|
-
if (e.length !== u)
|
|
184
|
-
throw new Error("Field.fromBytes: expected " + u + " bytes, got " + e.length);
|
|
185
|
-
return o ? S(e) : _(e);
|
|
186
|
-
},
|
|
187
|
-
// TODO: we don't need it here, move out to separate fn
|
|
188
|
-
invertBatch: (e) => G(w, e),
|
|
189
|
-
// We can't move this out because Fp6, Fp12 implement it
|
|
190
|
-
// and it's unclear what to return in there.
|
|
191
|
-
cmov: (e, l, a) => a ? l : e
|
|
192
|
-
});
|
|
193
|
-
return Object.freeze(w);
|
|
194
|
-
}
|
|
195
|
-
function A(t) {
|
|
196
|
-
if (typeof t != "bigint")
|
|
197
|
-
throw new Error("field order must be bigint");
|
|
198
|
-
const n = t.toString(2).length;
|
|
199
|
-
return Math.ceil(n / 8);
|
|
200
|
-
}
|
|
201
|
-
function W(t) {
|
|
202
|
-
const n = A(t);
|
|
203
|
-
return n + Math.ceil(n / 2);
|
|
204
|
-
}
|
|
205
|
-
function D(t, n, o = !1) {
|
|
206
|
-
const r = t.length, s = A(n), f = W(n);
|
|
207
|
-
if (r < 16 || r < f || r > 1024)
|
|
208
|
-
throw new Error("expected " + f + "-1024 bytes of input, got " + r);
|
|
209
|
-
const c = o ? S(t) : _(t), u = h(c, n - d) + d;
|
|
210
|
-
return o ? y(u, s) : I(u, s);
|
|
119
|
+
function v(t = 32) {
|
|
120
|
+
if (u && typeof u.getRandomValues == "function")
|
|
121
|
+
return u.getRandomValues(new Uint8Array(t));
|
|
122
|
+
if (u && typeof u.randomBytes == "function")
|
|
123
|
+
return Uint8Array.from(u.randomBytes(t));
|
|
124
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
211
125
|
}
|
|
212
126
|
export {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
O as
|
|
225
|
-
|
|
226
|
-
|
|
127
|
+
F as Hash,
|
|
128
|
+
c as abytes,
|
|
129
|
+
B as aexists,
|
|
130
|
+
U as ahash,
|
|
131
|
+
l as anumber,
|
|
132
|
+
H as aoutput,
|
|
133
|
+
h as byteSwap,
|
|
134
|
+
x as byteSwap32,
|
|
135
|
+
k as bytesToHex,
|
|
136
|
+
V as clean,
|
|
137
|
+
R as concatBytes,
|
|
138
|
+
O as createHasher,
|
|
139
|
+
_ as createView,
|
|
140
|
+
I as hexToBytes,
|
|
141
|
+
w as isBytes,
|
|
142
|
+
d as isLE,
|
|
143
|
+
v as randomBytes,
|
|
144
|
+
S as rotr,
|
|
145
|
+
T as swap32IfBE,
|
|
146
|
+
b as toBytes,
|
|
147
|
+
L as u32,
|
|
148
|
+
m as utf8ToBytes
|
|
227
149
|
};
|
package/dist/index264.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index267.cjs"),x=require("./index263.cjs"),_=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),f=new Uint32Array(64);class u extends e.HashMD{constructor(o=32){super(64,o,8,!1),this.A=e.SHA256_IV[0]|0,this.B=e.SHA256_IV[1]|0,this.C=e.SHA256_IV[2]|0,this.D=e.SHA256_IV[3]|0,this.E=e.SHA256_IV[4]|0,this.F=e.SHA256_IV[5]|0,this.G=e.SHA256_IV[6]|0,this.H=e.SHA256_IV[7]|0}get(){const{A:o,B:h,C:s,D:a,E:r,F:b,G:c,H:i}=this;return[o,h,s,a,r,b,c,i]}set(o,h,s,a,r,b,c,i){this.A=o|0,this.B=h|0,this.C=s|0,this.D=a|0,this.E=r|0,this.F=b|0,this.G=c|0,this.H=i|0}process(o,h){for(let t=0;t<16;t++,h+=4)f[t]=o.getUint32(h,!1);for(let t=16;t<64;t++){const H=f[t-15],d=f[t-2],S=x.rotr(H,7)^x.rotr(H,18)^H>>>3,l=x.rotr(d,17)^x.rotr(d,19)^d>>>10;f[t]=l+f[t-7]+S+f[t-16]|0}let{A:s,B:a,C:r,D:b,E:c,F:i,G:n,H:A}=this;for(let t=0;t<64;t++){const H=x.rotr(c,6)^x.rotr(c,11)^x.rotr(c,25),d=A+H+e.Chi(c,i,n)+_[t]+f[t]|0,l=(x.rotr(s,2)^x.rotr(s,13)^x.rotr(s,22))+e.Maj(s,a,r)|0;A=n,n=i,i=c,c=b+d|0,b=r,r=a,a=s,s=d+l|0}s=s+this.A|0,a=a+this.B|0,r=r+this.C|0,b=b+this.D|0,c=c+this.E|0,i=i+this.F|0,n=n+this.G|0,A=A+this.H|0,this.set(s,a,r,b,c,i,n,A)}roundClean(){x.clean(f)}destroy(){this.set(0,0,0,0,0,0,0,0),x.clean(this.buffer)}}const I=x.createHasher(()=>new u);exports.SHA256=u;exports.sha256=I;
|
package/dist/index264.js
CHANGED
|
@@ -1,9 +1,106 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { HashMD as D, SHA256_IV as b, Chi as g, Maj as p } from "./index267.js";
|
|
2
|
+
import { createHasher as u, clean as C, rotr as i } from "./index263.js";
|
|
3
|
+
const B = /* @__PURE__ */ Uint32Array.from([
|
|
4
|
+
1116352408,
|
|
5
|
+
1899447441,
|
|
6
|
+
3049323471,
|
|
7
|
+
3921009573,
|
|
8
|
+
961987163,
|
|
9
|
+
1508970993,
|
|
10
|
+
2453635748,
|
|
11
|
+
2870763221,
|
|
12
|
+
3624381080,
|
|
13
|
+
310598401,
|
|
14
|
+
607225278,
|
|
15
|
+
1426881987,
|
|
16
|
+
1925078388,
|
|
17
|
+
2162078206,
|
|
18
|
+
2614888103,
|
|
19
|
+
3248222580,
|
|
20
|
+
3835390401,
|
|
21
|
+
4022224774,
|
|
22
|
+
264347078,
|
|
23
|
+
604807628,
|
|
24
|
+
770255983,
|
|
25
|
+
1249150122,
|
|
26
|
+
1555081692,
|
|
27
|
+
1996064986,
|
|
28
|
+
2554220882,
|
|
29
|
+
2821834349,
|
|
30
|
+
2952996808,
|
|
31
|
+
3210313671,
|
|
32
|
+
3336571891,
|
|
33
|
+
3584528711,
|
|
34
|
+
113926993,
|
|
35
|
+
338241895,
|
|
36
|
+
666307205,
|
|
37
|
+
773529912,
|
|
38
|
+
1294757372,
|
|
39
|
+
1396182291,
|
|
40
|
+
1695183700,
|
|
41
|
+
1986661051,
|
|
42
|
+
2177026350,
|
|
43
|
+
2456956037,
|
|
44
|
+
2730485921,
|
|
45
|
+
2820302411,
|
|
46
|
+
3259730800,
|
|
47
|
+
3345764771,
|
|
48
|
+
3516065817,
|
|
49
|
+
3600352804,
|
|
50
|
+
4094571909,
|
|
51
|
+
275423344,
|
|
52
|
+
430227734,
|
|
53
|
+
506948616,
|
|
54
|
+
659060556,
|
|
55
|
+
883997877,
|
|
56
|
+
958139571,
|
|
57
|
+
1322822218,
|
|
58
|
+
1537002063,
|
|
59
|
+
1747873779,
|
|
60
|
+
1955562222,
|
|
61
|
+
2024104815,
|
|
62
|
+
2227730452,
|
|
63
|
+
2361852424,
|
|
64
|
+
2428436474,
|
|
65
|
+
2756734187,
|
|
66
|
+
3204031479,
|
|
67
|
+
3329325298
|
|
68
|
+
]), h = /* @__PURE__ */ new Uint32Array(64);
|
|
69
|
+
class E extends D {
|
|
70
|
+
constructor(o = 32) {
|
|
71
|
+
super(64, o, 8, !1), this.A = b[0] | 0, this.B = b[1] | 0, this.C = b[2] | 0, this.D = b[3] | 0, this.E = b[4] | 0, this.F = b[5] | 0, this.G = b[6] | 0, this.H = b[7] | 0;
|
|
72
|
+
}
|
|
73
|
+
get() {
|
|
74
|
+
const { A: o, B: r, C: t, D: s, E: a, F: f, G: c, H: e } = this;
|
|
75
|
+
return [o, r, t, s, a, f, c, e];
|
|
76
|
+
}
|
|
77
|
+
// prettier-ignore
|
|
78
|
+
set(o, r, t, s, a, f, c, e) {
|
|
79
|
+
this.A = o | 0, this.B = r | 0, this.C = t | 0, this.D = s | 0, this.E = a | 0, this.F = f | 0, this.G = c | 0, this.H = e | 0;
|
|
80
|
+
}
|
|
81
|
+
process(o, r) {
|
|
82
|
+
for (let x = 0; x < 16; x++, r += 4)
|
|
83
|
+
h[x] = o.getUint32(r, !1);
|
|
84
|
+
for (let x = 16; x < 64; x++) {
|
|
85
|
+
const H = h[x - 15], d = h[x - 2], m = i(H, 7) ^ i(H, 18) ^ H >>> 3, l = i(d, 17) ^ i(d, 19) ^ d >>> 10;
|
|
86
|
+
h[x] = l + h[x - 7] + m + h[x - 16] | 0;
|
|
87
|
+
}
|
|
88
|
+
let { A: t, B: s, C: a, D: f, E: c, F: e, G: n, H: A } = this;
|
|
89
|
+
for (let x = 0; x < 64; x++) {
|
|
90
|
+
const H = i(c, 6) ^ i(c, 11) ^ i(c, 25), d = A + H + g(c, e, n) + B[x] + h[x] | 0, l = (i(t, 2) ^ i(t, 13) ^ i(t, 22)) + p(t, s, a) | 0;
|
|
91
|
+
A = n, n = e, e = c, c = f + d | 0, f = a, a = s, s = t, t = d + l | 0;
|
|
92
|
+
}
|
|
93
|
+
t = t + this.A | 0, s = s + this.B | 0, a = a + this.C | 0, f = f + this.D | 0, c = c + this.E | 0, e = e + this.F | 0, n = n + this.G | 0, A = A + this.H | 0, this.set(t, s, a, f, c, e, n, A);
|
|
94
|
+
}
|
|
95
|
+
roundClean() {
|
|
96
|
+
C(h);
|
|
97
|
+
}
|
|
98
|
+
destroy() {
|
|
99
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), C(this.buffer);
|
|
100
|
+
}
|
|
6
101
|
}
|
|
102
|
+
const y = /* @__PURE__ */ u(() => new E());
|
|
7
103
|
export {
|
|
8
|
-
|
|
104
|
+
E as SHA256,
|
|
105
|
+
y as sha256
|
|
9
106
|
};
|
package/dist/index265.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index300.cjs");/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function c(r,t){const e=s=>a.weierstrass({...r,hash:s});return{...e(t),create:e}}exports.createCurve=c;
|
package/dist/index265.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
return
|
|
6
|
-
}
|
|
1
|
+
import { weierstrass as s } from "./index300.js";
|
|
2
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3
|
+
function c(e, t) {
|
|
4
|
+
const r = (o) => s({ ...e, hash: o });
|
|
5
|
+
return { ...r(t), create: r };
|
|
6
|
+
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
c as createCurve
|
|
9
9
|
};
|
package/dist/index266.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index263.cjs");class r extends i.Hash{constructor(t,h){super(),this.finished=!1,this.destroyed=!1,i.ahash(t);const n=i.toBytes(h);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const a=this.blockLen,e=new Uint8Array(a);e.set(n.length>a?t.create().update(n).digest():n);for(let s=0;s<e.length;s++)e[s]^=54;this.iHash.update(e),this.oHash=t.create();for(let s=0;s<e.length;s++)e[s]^=106;this.oHash.update(e),i.clean(e)}update(t){return i.aexists(this),this.iHash.update(t),this}digestInto(t){i.aexists(this),i.abytes(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:h,iHash:n,finished:a,destroyed:e,blockLen:s,outputLen:d}=this;return t=t,t.finished=a,t.destroyed=e,t.blockLen=s,t.outputLen=d,t.oHash=h._cloneInto(t.oHash),t.iHash=n._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const c=(o,t,h)=>new r(o,t).update(h).digest();c.create=(o,t)=>new r(o,t);exports.HMAC=r;exports.hmac=c;
|
package/dist/index266.js
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
if (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { Hash as d, ahash as u, toBytes as H, clean as l, aexists as a, abytes as p } from "./index263.js";
|
|
2
|
+
class r extends d {
|
|
3
|
+
constructor(t, i) {
|
|
4
|
+
super(), this.finished = !1, this.destroyed = !1, u(t);
|
|
5
|
+
const h = H(i);
|
|
6
|
+
if (this.iHash = t.create(), typeof this.iHash.update != "function")
|
|
7
|
+
throw new Error("Expected instance of class which extends utils.Hash");
|
|
8
|
+
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
9
|
+
const o = this.blockLen, e = new Uint8Array(o);
|
|
10
|
+
e.set(h.length > o ? t.create().update(h).digest() : h);
|
|
11
|
+
for (let s = 0; s < e.length; s++)
|
|
12
|
+
e[s] ^= 54;
|
|
13
|
+
this.iHash.update(e), this.oHash = t.create();
|
|
14
|
+
for (let s = 0; s < e.length; s++)
|
|
15
|
+
e[s] ^= 106;
|
|
16
|
+
this.oHash.update(e), l(e);
|
|
17
|
+
}
|
|
18
|
+
update(t) {
|
|
19
|
+
return a(this), this.iHash.update(t), this;
|
|
20
|
+
}
|
|
21
|
+
digestInto(t) {
|
|
22
|
+
a(this), p(t, this.outputLen), this.finished = !0, this.iHash.digestInto(t), this.oHash.update(t), this.oHash.digestInto(t), this.destroy();
|
|
23
|
+
}
|
|
24
|
+
digest() {
|
|
25
|
+
const t = new Uint8Array(this.oHash.outputLen);
|
|
26
|
+
return this.digestInto(t), t;
|
|
27
|
+
}
|
|
28
|
+
_cloneInto(t) {
|
|
29
|
+
t || (t = Object.create(Object.getPrototypeOf(this), {}));
|
|
30
|
+
const { oHash: i, iHash: h, finished: o, destroyed: e, blockLen: s, outputLen: c } = this;
|
|
31
|
+
return t = t, t.finished = o, t.destroyed = e, t.blockLen = s, t.outputLen = c, t.oHash = i._cloneInto(t.oHash), t.iHash = h._cloneInto(t.iHash), t;
|
|
32
|
+
}
|
|
33
|
+
clone() {
|
|
34
|
+
return this._cloneInto();
|
|
35
|
+
}
|
|
36
|
+
destroy() {
|
|
37
|
+
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
22
38
|
}
|
|
23
|
-
if (!o)
|
|
24
|
-
throw new u("Unable to normalize signature.");
|
|
25
|
-
return t;
|
|
26
39
|
}
|
|
40
|
+
const y = (n, t, i) => new r(n, t).update(i).digest();
|
|
41
|
+
y.create = (n, t) => new r(n, t);
|
|
27
42
|
export {
|
|
28
|
-
|
|
43
|
+
r as HMAC,
|
|
44
|
+
y as hmac
|
|
29
45
|
};
|
package/dist/index267.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index263.cjs");function p(o,t,s,i){if(typeof o.setBigUint64=="function")return o.setBigUint64(t,s,i);const n=BigInt(32),r=BigInt(4294967295),e=Number(s>>n&r),h=Number(s&r),u=i?4:0,l=i?0:4;o.setUint32(t+u,e,i),o.setUint32(t+l,h,i)}function g(o,t,s){return o&t^~o&s}function b(o,t,s){return o&t^o&s^t&s}class d extends f.Hash{constructor(t,s,i,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=s,this.padOffset=i,this.isLE=n,this.buffer=new Uint8Array(t),this.view=f.createView(this.buffer)}update(t){f.aexists(this),t=f.toBytes(t),f.abytes(t);const{view:s,buffer:i,blockLen:n}=this,r=t.length;for(let e=0;e<r;){const h=Math.min(n-this.pos,r-e);if(h===n){const u=f.createView(t);for(;n<=r-e;e+=n)this.process(u,e);continue}i.set(t.subarray(e,e+h),this.pos),this.pos+=h,e+=h,this.pos===n&&(this.process(s,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){f.aexists(this),f.aoutput(t,this),this.finished=!0;const{buffer:s,view:i,blockLen:n,isLE:r}=this;let{pos:e}=this;s[e++]=128,f.clean(this.buffer.subarray(e)),this.padOffset>n-e&&(this.process(i,0),e=0);for(let c=e;c<n;c++)s[c]=0;p(i,n-8,BigInt(this.length*8),r),this.process(i,0);const h=f.createView(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,a=this.get();if(l>a.length)throw new Error("_sha2: outputLen bigger than state");for(let c=0;c<l;c++)h.setUint32(4*c,a[c],r)}digest(){const{buffer:t,outputLen:s}=this;this.digestInto(t);const i=t.slice(0,s);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:s,buffer:i,length:n,finished:r,destroyed:e,pos:h}=this;return t.destroyed=e,t.finished=r,t.length=n,t.pos=h,n%s&&t.buffer.set(i),t}clone(){return this._cloneInto()}}const w=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);exports.Chi=g;exports.HashMD=d;exports.Maj=b;exports.SHA256_IV=w;exports.setBigUint64=p;
|