Skip to content

Commit

Permalink
Merge branch 'release/v0.16.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Feb 9, 2024
2 parents 0dbebe4 + 20ad872 commit 6fcce80
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zeed",
"type": "module",
"version": "0.16.9",
"version": "0.16.10",
"description": "🌱 Simple foundation library",
"author": {
"name": "Dirk Holtwick",
Expand Down
4 changes: 2 additions & 2 deletions src/common/bin/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ describe('encoder', () => {
const bin = stream.getUint8Array()

expect(Uint8ArrayToHexDump(bin)).toMatchInlineSnapshot(`
"0000 01 00 00 00 76 01 01 61 77 02 39 39 01 02 03 7D ....v..aw.99...}
0010 BB 01 ». "
"0000 01 00 00 00 76 01 01 61 77 02 39 39 01 02 03 7d ....v..aw.99...}
0010 bb 01 ». "
`)

expect(stream.getLength()).toBe(18)
Expand Down
8 changes: 1 addition & 7 deletions src/common/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
/* eslint-disable prefer-spread */
/* eslint-disable no-cond-assign */

import {
decrypt,
deriveKeyPbkdf2,
digest,
encrypt,
randomUint8Array,
} from './crypto'
import { decrypt, deriveKeyPbkdf2, digest, encrypt, randomUint8Array } from './crypto'
import { equalBinary, toHex } from './data/bin'
import { DefaultLogger } from '.'

Expand Down
32 changes: 16 additions & 16 deletions src/common/data/bin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,22 +272,22 @@ Uint8Array [
const data = new Uint8Array(values)
const hex = Uint8ArrayToHexDump(data)
expect(hex).toMatchInlineSnapshot(`
"0000 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ................
0010 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F ................
0020 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F .!"#$%&'()*+,-./
0030 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F 0123456789:;<=>?
0040 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F @ABCDEFGHIJKLMNO
0050 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F PQRSTUVWXYZ[\\]^_
0060 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F \`abcdefghijklmno
0070 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F pqrstuvwxyz{|}~.
0080 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ................
0090 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F ................
00a0 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF .¡¢£¤¥¦§¨©ª«¬.®¯
00b0 B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF °±²³´µ¶·¸¹º»¼½¾¿
00c0 C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ
00d0 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß
00e0 E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF àáâãäåæçèéêëìíîï
00f0 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF ðñòóôõö÷øùúûüýþÿ"
"0000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
0010 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................
0020 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f .!"#$%&'()*+,-./
0030 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 0123456789:;<=>?
0040 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f @ABCDEFGHIJKLMNO
0050 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f PQRSTUVWXYZ[\\]^_
0060 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f \`abcdefghijklmno
0070 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f pqrstuvwxyz{|}~.
0080 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f ................
0090 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f ................
00a0 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af .¡¢£¤¥¦§¨©ª«¬.®¯
00b0 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf °±²³´µ¶·¸¹º»¼½¾¿
00c0 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ
00d0 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df ÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß
00e0 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef àáâãäåæçèéêëìíîï
00f0 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff ðñòóôõö÷øùúûüýþÿ"
`)
})

Expand Down
2 changes: 1 addition & 1 deletion src/common/data/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export function Uint8ArrayToHexDump(

blockSize = blockSize || 16
const lines = []
const hex = '0123456789ABCDEF'
const hex = '0123456789abcdef' // '0123456789ABCDEF'
for (let b = 0; b < buffer.length; b += blockSize) {
const block = buffer.slice(b, Math.min(b + blockSize, buffer.length))
const addr = (`0000${b.toString(16)}`).slice(-4)
Expand Down

0 comments on commit 6fcce80

Please sign in to comment.