mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(new tool): Hex Converter
Convert hex buffer to (un)signed integer/float Fix #1447
This commit is contained in:
1 parent
8d1d069cd2
commit
a29a5b5365
8 files changed
+801
-62
No files matched your search
Vendored
+1
@@ -259,6 +259,7 @@ declare module '@vue/runtime-core' {
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
"apache-md5": "^1.1.8",
|
||||
"arr-diff": "^4.0.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"byte-data": "^19.0.1",
|
||||
"big.js": "^6.2.2",
|
||||
"bwip-js": "^4.5.1",
|
||||
"change-case": "^5.4.4",
|
||||
@@ -128,6 +129,7 @@
|
||||
"hash-wasm": "^4.12.0",
|
||||
"haversine": "^1.1.1",
|
||||
"heic-convert": "^2.1.0",
|
||||
"hex-array": "^1.0.0",
|
||||
"highlight.js": "^11.11.1",
|
||||
"iarna-toml-esm": "^3.0.5",
|
||||
"ibantools": "^4.5.1",
|
||||
@@ -274,6 +276,7 @@
|
||||
"@types/emscripten": "^1.40.0",
|
||||
"@types/figlet": "^1.7.0",
|
||||
"@types/js-beautify": "^1.14.3",
|
||||
"@types/hex-array": "^1.0.2",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/jsonpath": "^0.2.4",
|
||||
"@types/libmime": "^5.0.3",
|
||||
|
||||
Generated
+37
-62
@@ -100,7 +100,7 @@ dependencies:
|
||||
version: 10.11.1(vue@3.3.4)
|
||||
'@vueuse/head':
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0(typescript@5.2.2)(vue@3.3.4)
|
||||
version: 1.0.0(vue@3.3.4)
|
||||
'@vueuse/router':
|
||||
specifier: ^10.0.0
|
||||
version: 10.0.0(vue-router@4.1.6)(vue@3.3.4)
|
||||
@@ -131,6 +131,9 @@ dependencies:
|
||||
bwip-js:
|
||||
specifier: ^4.5.1
|
||||
version: 4.5.1
|
||||
byte-data:
|
||||
specifier: ^19.0.1
|
||||
version: 19.0.1
|
||||
change-case:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
@@ -278,6 +281,9 @@ dependencies:
|
||||
heic-convert:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
hex-array:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
highlight.js:
|
||||
specifier: ^11.11.1
|
||||
version: 11.11.1
|
||||
@@ -709,6 +715,9 @@ devDependencies:
|
||||
'@types/figlet':
|
||||
specifier: ^1.7.0
|
||||
version: 1.7.0
|
||||
'@types/hex-array':
|
||||
specifier: ^1.0.2
|
||||
version: 1.0.2
|
||||
'@types/js-beautify':
|
||||
specifier: ^1.14.3
|
||||
version: 1.14.3
|
||||
@@ -5734,6 +5743,10 @@ packages:
|
||||
resolution: {integrity: sha512-t2loPC7vWBPGUlViZy0K5KeyHBL5FP7UPhdzQMI98ofy+D9/tv+2ciAB1eAhCSseMDMLqQvS4KNk8PSMC+TOHg==}
|
||||
dev: false
|
||||
|
||||
/@types/hex-array@1.0.2:
|
||||
resolution: {integrity: sha512-H1QsLqz6k9QTioutUQUiBiyM4CMmE6A1prXHGotw42j8sN5H/ScC5OxIbcrXnipikrJ5Qn3aozWb9UXBKUscJQ==}
|
||||
dev: true
|
||||
|
||||
/@types/js-beautify@1.14.3:
|
||||
resolution: {integrity: sha512-FMbQHz+qd9DoGvgLHxeqqVPaNRffpIu5ZjozwV8hf9JAGpIOzuAf4wGbRSo8LNITHqGjmmVjaMggTT5P4v4IHg==}
|
||||
dev: true
|
||||
@@ -6275,18 +6288,16 @@ packages:
|
||||
'@unhead/schema': 0.5.1
|
||||
dev: false
|
||||
|
||||
/@unhead/vue@0.5.1(typescript@5.2.2)(vue@3.3.4):
|
||||
/@unhead/vue@0.5.1(vue@3.3.4):
|
||||
resolution: {integrity: sha512-s4y4uj3NMqaUs0K+WQXbWGj/2+Glk/DEJ9yeJOcJIiro/+IhUMByD71jyCM43Xn8YBPy14VY/ZYb9ZFU2WCZgw==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
dependencies:
|
||||
'@unhead/dom': 0.5.1
|
||||
'@unhead/schema': 0.5.1
|
||||
'@vueuse/shared': 12.8.2(typescript@5.2.2)
|
||||
'@vueuse/shared': 13.0.0(vue@3.3.4)
|
||||
unhead: 0.5.1
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@unicode/unicode-15.1.0@1.6.5:
|
||||
@@ -6698,6 +6709,7 @@ packages:
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-dom@3.2.47:
|
||||
resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==}
|
||||
@@ -6717,6 +6729,7 @@ packages:
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-sfc@3.2.47:
|
||||
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
|
||||
@@ -6759,6 +6772,7 @@ packages:
|
||||
magic-string: 0.30.17
|
||||
postcss: 8.4.49
|
||||
source-map-js: 1.2.1
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-ssr@3.2.47:
|
||||
resolution: {integrity: sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==}
|
||||
@@ -6778,6 +6792,7 @@ packages:
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: true
|
||||
|
||||
/@vue/devtools-api@6.5.0:
|
||||
resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==}
|
||||
@@ -6825,25 +6840,12 @@ packages:
|
||||
dependencies:
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/reactivity@3.5.13:
|
||||
resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/runtime-core@3.3.4:
|
||||
resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.3.4
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/@vue/runtime-core@3.5.13:
|
||||
resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
dev: false
|
||||
|
||||
/@vue/runtime-dom@3.3.4:
|
||||
resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==}
|
||||
dependencies:
|
||||
@@ -6851,15 +6853,6 @@ packages:
|
||||
'@vue/shared': 3.3.4
|
||||
csstype: 3.1.2
|
||||
|
||||
/@vue/runtime-dom@3.5.13:
|
||||
resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.5.13
|
||||
'@vue/runtime-core': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
csstype: 3.1.3
|
||||
dev: false
|
||||
|
||||
/@vue/server-renderer@3.3.4(vue@3.3.4):
|
||||
resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==}
|
||||
peerDependencies:
|
||||
@@ -6880,16 +6873,6 @@ packages:
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/@vue/server-renderer@3.5.13(vue@3.5.13):
|
||||
resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==}
|
||||
peerDependencies:
|
||||
vue: 3.5.13
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.5.13
|
||||
'@vue/shared': 3.5.13
|
||||
vue: 3.5.13(typescript@5.2.2)
|
||||
dev: false
|
||||
|
||||
/@vue/shared@3.2.47:
|
||||
resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==}
|
||||
dev: true
|
||||
@@ -6899,6 +6882,7 @@ packages:
|
||||
|
||||
/@vue/shared@3.5.13:
|
||||
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
|
||||
dev: true
|
||||
|
||||
/@vue/test-utils@2.3.2(vue@3.3.4):
|
||||
resolution: {integrity: sha512-hJnVaYhbrIm0yBS0+e1Y0Sj85cMyAi+PAbK4JHqMRUZ6S622Goa+G7QzkRSyvCteG8wop7tipuEbHoZo26wsSA==}
|
||||
@@ -6937,17 +6921,15 @@ packages:
|
||||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/head@1.0.0(typescript@5.2.2)(vue@3.3.4):
|
||||
/@vueuse/head@1.0.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-wighjD6iLxEitpg6EDeS5dGDB9tcOSMhpblrAOKR6qBP93U3cjG72n0LhlBUD9miu41lNxXFVGHgSc6BVJ9BMg==}
|
||||
peerDependencies:
|
||||
vue: '>=2.7 || >=3'
|
||||
dependencies:
|
||||
'@unhead/schema': 0.5.1
|
||||
'@unhead/ssr': 0.5.1
|
||||
'@unhead/vue': 0.5.1(typescript@5.2.2)(vue@3.3.4)
|
||||
'@unhead/vue': 0.5.1(vue@3.3.4)
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
/@vueuse/metadata@10.11.1:
|
||||
@@ -6985,12 +6967,12 @@ packages:
|
||||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/shared@12.8.2(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==}
|
||||
/@vueuse/shared@13.0.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-9MiHhAPw+sqCF/RLo8V6HsjRqEdNEWVpDLm2WBRW2G/kSQjb8X901sozXpSCaeLG0f7TEfMrT4XNaA5m1ez7Dg==}
|
||||
peerDependencies:
|
||||
vue: ^3.5.0
|
||||
dependencies:
|
||||
vue: 3.5.13(typescript@5.2.2)
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
vue: 3.3.4
|
||||
dev: false
|
||||
|
||||
/@xmldom/xmldom@0.8.10:
|
||||
@@ -7662,6 +7644,11 @@ packages:
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/byte-data@19.0.1:
|
||||
resolution: {integrity: sha512-xRvkTvO28wr0+0rErSETHD8Cw+P444Az3/jkTezaMw5R+TTW8ZNXuvPZf9/ZhnSRRvlMnJsVhc+ecYvOMy/MQQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/bytes.js@0.0.2:
|
||||
resolution: {integrity: sha512-KrLm4hv5Qs9w6b0U7h1bCdqxrsf+e9QMsfHeyQFzAz94x/5Aqa+FTEUSNBtt5d2VuV3Hfiea3c4ti74RZDDYkg==}
|
||||
dev: false
|
||||
@@ -10788,6 +10775,10 @@ packages:
|
||||
libheif-js: 1.18.2
|
||||
dev: false
|
||||
|
||||
/hex-array@1.0.0:
|
||||
resolution: {integrity: sha512-dbjcApZ+RBr2DYCqs2gab5So6q4rM5VBqFg8oeOPc/s8PzrD48pf4w9e7DC4G+Gq4CEkHYQxqn7uYAQZKVWo8w==}
|
||||
dev: false
|
||||
|
||||
/highlight.js@11.11.1:
|
||||
resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
@@ -16981,22 +16972,6 @@ packages:
|
||||
'@vue/server-renderer': 3.3.4(vue@3.3.4)
|
||||
'@vue/shared': 3.3.4
|
||||
|
||||
/vue@3.5.13(typescript@5.2.2):
|
||||
resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.5.13
|
||||
'@vue/compiler-sfc': 3.5.13
|
||||
'@vue/runtime-dom': 3.5.13
|
||||
'@vue/server-renderer': 3.5.13(vue@3.5.13)
|
||||
'@vue/shared': 3.5.13
|
||||
typescript: 5.2.2
|
||||
dev: false
|
||||
|
||||
/vuedraggable@4.1.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
|
||||
peerDependencies:
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { cleanHex, decodeNumber, decodeStruct, encodeStruct, getCoderFromTypeName, parseNumber } from './hex-converter.service';
|
||||
|
||||
describe('cleanHex', () => {
|
||||
it('should remove 0x and \\x prefixes from a hex string', () => {
|
||||
expect(cleanHex('0x1234')).toBe('1234');
|
||||
expect(cleanHex('\\x1234')).toBe('1234');
|
||||
expect(cleanHex('1234')).toBe('1234');
|
||||
});
|
||||
});
|
||||
|
||||
describe('decodeNumber', () => {
|
||||
it('should convert a number to binary', () => {
|
||||
expect(decodeNumber(10, 8, 'bin')).toBe('00001010');
|
||||
});
|
||||
|
||||
it('should convert a number to hex', () => {
|
||||
expect(decodeNumber(10, 8, 'hex')).toBe('0a');
|
||||
});
|
||||
|
||||
it('should convert a number to character', () => {
|
||||
expect(decodeNumber(65, 8, 'char')).toBe('A');
|
||||
});
|
||||
|
||||
it('should return the number itself for decimal conversion', () => {
|
||||
expect(decodeNumber(10, 8, 'dec')).toBe(10);
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseNumber', () => {
|
||||
it('should parse hexadecimal input correctly', () => {
|
||||
expect(parseNumber('0x1F')).toBe(31);
|
||||
});
|
||||
|
||||
it('should parse binary input correctly', () => {
|
||||
expect(parseNumber('0b1101')).toBe(13);
|
||||
});
|
||||
|
||||
it('should parse string input correctly into code points', () => {
|
||||
expect(parseNumber('abc')).toEqual([97, 98, 99]);
|
||||
});
|
||||
|
||||
it('should return number when input is already a number', () => {
|
||||
expect(parseNumber(42)).toBe(42);
|
||||
});
|
||||
|
||||
it('should return 0 for falsy input', () => {
|
||||
expect(parseNumber('')).toBe(0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('getCoderFromTypeName', () => {
|
||||
it('should return correct coder options for a basic integer type', () => {
|
||||
const result = getCoderFromTypeName('uint16');
|
||||
expect(result.type.bits).toBe(16);
|
||||
expect(result.type.signed).toBe(false);
|
||||
expect(result.size).toBe(1);
|
||||
});
|
||||
|
||||
it('should handle big-endian types correctly', () => {
|
||||
const result = getCoderFromTypeName('int32be');
|
||||
expect(result.type.bits).toBe(32);
|
||||
expect(result.type.be).toBe(true);
|
||||
});
|
||||
|
||||
it('should return correct coder options for a float type', () => {
|
||||
const result = getCoderFromTypeName('float');
|
||||
expect(result.type.bits).toBe(32);
|
||||
expect(result.type.fp).toBe(true);
|
||||
});
|
||||
|
||||
it('should return correct coder options for a character type', () => {
|
||||
const result = getCoderFromTypeName('char[4]');
|
||||
expect(result.type.bits).toBe(8);
|
||||
expect(result.size).toBe(4);
|
||||
expect(result.formatter(65, 8)).toBe('A');
|
||||
});
|
||||
});
|
||||
|
||||
describe('decodeStruct', () => {
|
||||
it('should decode a flat struct correctly from a hex array', () => {
|
||||
const struct = {
|
||||
field1: 'uint16',
|
||||
field2: 'char[3]',
|
||||
};
|
||||
const hexArray = new Uint8Array([0x01, 0x0, 0x61, 0x62, 0x63]);
|
||||
|
||||
const result = decodeStruct({ struct, hexArray });
|
||||
expect(result.field1).toBe(1);
|
||||
expect(result.field2).toBe('abc');
|
||||
});
|
||||
|
||||
it('should decode a nested struct correctly', () => {
|
||||
const struct = {
|
||||
type: 'int8',
|
||||
header: {
|
||||
version: 'uint8',
|
||||
type: 'uint16be',
|
||||
},
|
||||
payload: {
|
||||
value: 'floatbe',
|
||||
},
|
||||
};
|
||||
const hexArray = new Uint8Array([0xFF, 0x01, 0x00, 0x02, 0x3F, 0x80, 0x0, 0x0]); // float 1.0
|
||||
|
||||
const result = decodeStruct({ struct, hexArray });
|
||||
expect(result).toEqual({
|
||||
type: -1,
|
||||
header: { version: 1, type: 2 },
|
||||
payload: { value: 1.0 },
|
||||
});
|
||||
});
|
||||
|
||||
it('should throw on bad buffer length', () => {
|
||||
const struct = {
|
||||
type: 'int8',
|
||||
header: {
|
||||
version: 'uint8',
|
||||
type: 'uint16be',
|
||||
},
|
||||
payload: {
|
||||
value: 'floatbe',
|
||||
},
|
||||
};
|
||||
const hexArray = new Uint8Array([0xFF, 0x01, 0x00, 0x02, 0x3F, 0x80]); // missing last two bytes
|
||||
|
||||
expect(() => decodeStruct({ struct, hexArray })).toThrowError(
|
||||
'Bad buffer length reading value(floatbe) at offset 4',
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw an error when decoding an unsupported array type', () => {
|
||||
const struct = {
|
||||
list: ['uint8'],
|
||||
};
|
||||
const hexArray = new Uint8Array([0x01, 0x02, 0x03]);
|
||||
|
||||
expect(() => decodeStruct({ struct, hexArray })).toThrowError(
|
||||
'Cannot decode a struct with array',
|
||||
);
|
||||
});
|
||||
it('should throw an error when decoding an unsized array type', () => {
|
||||
const struct = {
|
||||
list: 'uint8[]',
|
||||
};
|
||||
const hexArray = new Uint8Array([0x01, 0x02, 0x03]);
|
||||
|
||||
expect(() => decodeStruct({ struct, hexArray })).toThrowError(
|
||||
'Unsupported unsized array: uint8[]',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('encodeStruct', () => {
|
||||
it('should encode a flat struct correctly', () => {
|
||||
const struct = {
|
||||
field1: 'uint8',
|
||||
field2: 'char[3]',
|
||||
};
|
||||
const jsonObject = {
|
||||
field1: 1,
|
||||
field2: 'abc',
|
||||
};
|
||||
|
||||
const result = encodeStruct({ struct, jsonObject });
|
||||
expect(result).toEqual(new Uint8Array([0x01, 0x61, 0x62, 0x63]));
|
||||
});
|
||||
|
||||
it('should encode a nested struct correctly', () => {
|
||||
const struct = {
|
||||
type: 'int8',
|
||||
header: {
|
||||
version: 'uint8',
|
||||
type: 'uint16be',
|
||||
},
|
||||
payload: {
|
||||
value: 'floatbe',
|
||||
},
|
||||
};
|
||||
const jsonObject = {
|
||||
type: -1,
|
||||
header: { version: 1, type: 2 },
|
||||
payload: { value: 1.0 },
|
||||
};
|
||||
|
||||
const result = encodeStruct({ struct, jsonObject });
|
||||
expect(result).toEqual(new Uint8Array([0xFF, 0x01, 0x00, 0x02, 0x3F, 0x80, 0x0, 0x0]));
|
||||
});
|
||||
|
||||
it('should throw an error if array size is incorrect', () => {
|
||||
const struct = {
|
||||
field1: 'uint8',
|
||||
field2: 'char[3]',
|
||||
};
|
||||
const jsonObject = {
|
||||
field1: 1,
|
||||
field2: 'abcd', // Too long
|
||||
};
|
||||
|
||||
expect(() => encodeStruct({ struct, jsonObject })).toThrowError(
|
||||
'Unexpected array size \'field2\'=\'97,98,99,100\' expected 3 elements',
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw an error if value type is incorrect', () => {
|
||||
const struct = {
|
||||
field1: 'uint8',
|
||||
field2: 'char[3]',
|
||||
};
|
||||
const jsonObject = {
|
||||
field1: 1,
|
||||
field2: 123, // Invalid type
|
||||
};
|
||||
|
||||
expect(() => encodeStruct({ struct, jsonObject })).toThrowError(
|
||||
'Unexpected non array \'field2\'=\'123\'',
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw an error if value type is incorrect', () => {
|
||||
const struct = {
|
||||
field1: 'uint8',
|
||||
field2: 'int16',
|
||||
};
|
||||
const jsonObject = {
|
||||
field1: 1,
|
||||
field2: '123', // Invalid type
|
||||
};
|
||||
|
||||
expect(() => encodeStruct({ struct, jsonObject })).toThrowError(
|
||||
'Unexpected array size \'field2\'=\'49,50,51\' expected 1 elements',
|
||||
);
|
||||
});
|
||||
|
||||
it('should encode multiple integer types correctly', () => {
|
||||
const struct = {
|
||||
a: 'uint8',
|
||||
b: 'uint16',
|
||||
c: 'uint32',
|
||||
};
|
||||
const jsonObject = {
|
||||
a: 1,
|
||||
b: 513,
|
||||
c: 67305985,
|
||||
};
|
||||
|
||||
const result = encodeStruct({ struct, jsonObject });
|
||||
expect(result).toEqual(new Uint8Array([0x01, 0x01, 0x02, 0x01, 0x02, 0x03, 0x04]));
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,193 @@
|
||||
import { pack, unpack } from 'byte-data';
|
||||
|
||||
export type Conversion = 'dec' | 'bin' | 'hex' | 'char';
|
||||
|
||||
export function cleanHex(hex: string): string {
|
||||
return hex.replace(/\\x|0x/g, '');
|
||||
}
|
||||
|
||||
export function decodeNumber(n: number, bits: number, conv: Conversion) {
|
||||
if (conv === 'bin') {
|
||||
return n.toString(2).padStart(bits, '0');
|
||||
}
|
||||
if (conv === 'hex') {
|
||||
return n.toString(16).padStart(bits / 4, '0');
|
||||
}
|
||||
if (conv === 'char') {
|
||||
return String.fromCodePoint(n);
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
export function parseNumber(input: string | number): number | number[] {
|
||||
if (!input) {
|
||||
return 0;
|
||||
}
|
||||
if (typeof input === 'number') {
|
||||
return input;
|
||||
}
|
||||
|
||||
if (/^0x[0-9a-fA-F]+$/.test(input)) {
|
||||
return Number.parseInt(input.substring(2), 16); // Parse as hexadecimal
|
||||
}
|
||||
else if (/^0b[01]+$/.test(input)) {
|
||||
return Number.parseInt(input.substring(2), 2); // Parse as binary
|
||||
}
|
||||
|
||||
return [...input].map(c => c.codePointAt(0) || 0);
|
||||
}
|
||||
|
||||
function mergeModelAndObject(model: Record<string, any>, object: Record<string, any>): Record<string, any> {
|
||||
const merged: Record<string, any> = {};
|
||||
|
||||
for (const key in model) {
|
||||
if (Object.prototype.hasOwnProperty.call(model, key)) {
|
||||
if (Array.isArray(object[key])) {
|
||||
merged[key] = [model[key], object[key].map(parseNumber)];
|
||||
}
|
||||
else if (typeof object[key] === 'object' && !Array.isArray(object[key])) {
|
||||
merged[key] = mergeModelAndObject(model[key], object[key]);
|
||||
}
|
||||
else {
|
||||
merged[key] = [model[key], parseNumber(object[key])];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return merged;
|
||||
}
|
||||
|
||||
interface CoderOption {
|
||||
type: {
|
||||
bits: number
|
||||
fp?: boolean
|
||||
be?: boolean
|
||||
signed?: boolean
|
||||
}
|
||||
size: number
|
||||
formatter: (n: number, bits: number) => string | number
|
||||
join?: boolean
|
||||
};
|
||||
|
||||
export function getCoderFromTypeName(typeName: string): CoderOption {
|
||||
if (typeName.includes('[]')) {
|
||||
throw new Error(`Unsupported unsized array: ${typeName}`);
|
||||
}
|
||||
const [, prefix, baseTypeName, bigEndian, arraySize] = /^((?:0x|0b)?)(u?int\d+|w?char|half|float|double)(be)?(?:\[(\d+)\])?$/.exec(typeName) || [];
|
||||
let conv = 'dec';
|
||||
if (prefix === '0x') {
|
||||
conv = 'hex';
|
||||
}
|
||||
if (prefix === '0b') {
|
||||
conv = 'bin';
|
||||
}
|
||||
|
||||
const arraySizeNumber = Number.isNaN(Number(arraySize)) ? 1 : Number(arraySize);
|
||||
if (baseTypeName === 'char' || baseTypeName === 'wchar') {
|
||||
return {
|
||||
type: {
|
||||
bits: baseTypeName === 'char' ? 8 : 16,
|
||||
be: !!bigEndian,
|
||||
},
|
||||
size: arraySizeNumber,
|
||||
formatter: n => String.fromCodePoint(n),
|
||||
join: true,
|
||||
};
|
||||
}
|
||||
if (baseTypeName === 'float' || baseTypeName === 'double' || baseTypeName === 'half') {
|
||||
return {
|
||||
type: {
|
||||
bits: baseTypeName === 'float' ? 32 : (baseTypeName === 'double' ? 64 : 16),
|
||||
be: !!bigEndian,
|
||||
fp: true,
|
||||
},
|
||||
size: arraySizeNumber,
|
||||
formatter: n => n,
|
||||
};
|
||||
}
|
||||
|
||||
const [, unsigned, bits] = /^(u?)int(\d+)$/.exec(baseTypeName || '') || [];
|
||||
return {
|
||||
type: {
|
||||
bits: Number(bits),
|
||||
be: !!bigEndian,
|
||||
signed: !unsigned,
|
||||
},
|
||||
size: arraySizeNumber,
|
||||
formatter: (n, bits) => decodeNumber(n, bits, conv as Conversion),
|
||||
};
|
||||
}
|
||||
|
||||
export function decodeStruct({ struct, hexArray }: { struct: object; hexArray: Uint8Array }) {
|
||||
let offset = 0;
|
||||
const readMember = (obj: any) => {
|
||||
const result: Record<string, any> = {};
|
||||
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
if (Array.isArray(obj[key])) {
|
||||
throw new TypeError(`Cannot decode a struct with array (key=${key}). Must be expressed as string with fixed length`);
|
||||
}
|
||||
else if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
|
||||
result[key] = readMember(obj[key]);
|
||||
}
|
||||
else {
|
||||
const coderOption = getCoderFromTypeName(obj[key]);
|
||||
const arr = [];
|
||||
for (let i = 0; i < coderOption.size; i++) {
|
||||
const dataSize = Math.ceil(coderOption.type.bits / 8);
|
||||
if (offset + dataSize > hexArray.length) {
|
||||
throw new Error(`Bad buffer length reading ${key}(${obj[key]}) at offset ${offset}`);
|
||||
}
|
||||
arr.push(coderOption.formatter(unpack(hexArray, coderOption.type, offset), coderOption.type.bits));
|
||||
offset += dataSize;
|
||||
}
|
||||
if (coderOption.join) {
|
||||
result[key] = arr.join('');
|
||||
}
|
||||
else {
|
||||
result[key] = coderOption.size > 1 ? arr : arr[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
return readMember(struct);
|
||||
}
|
||||
|
||||
export function encodeStruct({ struct, jsonObject }: { struct: object; jsonObject: object }): Uint8Array {
|
||||
const mergedObject = mergeModelAndObject(struct, jsonObject);
|
||||
|
||||
let buffer: Array<number> = [];
|
||||
const writeMember = (obj: any) => {
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
if (typeof obj[key] === 'object' && !Array.isArray(obj[key])) {
|
||||
writeMember(obj[key]);
|
||||
}
|
||||
else if (Array.isArray(obj[key])) {
|
||||
const [typeName, value] = obj[key];
|
||||
const coderOption = getCoderFromTypeName(typeName);
|
||||
if (coderOption.size > 1 && !Array.isArray(value)) {
|
||||
throw new TypeError(`Unexpected non array '${key}'='${value}'`);
|
||||
}
|
||||
if (Array.isArray(value) && value.length !== coderOption.size) {
|
||||
throw new TypeError(`Unexpected array size '${key}'='${value}' expected ${coderOption.size} elements`);
|
||||
}
|
||||
const valueArr = !Array.isArray(value) ? [value] : value;
|
||||
for (let i = 0; i < coderOption.size; i++) {
|
||||
buffer = [...buffer, ...pack(valueArr[i], coderOption.type)];
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw new TypeError(`Unexpected '${key}'='${obj[key]}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
writeMember(mergedObject);
|
||||
|
||||
return new Uint8Array(buffer);
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
<script setup lang="ts">
|
||||
import hexArray from 'hex-array';
|
||||
import { packArray, packString, unpackArray, unpackString } from 'byte-data';
|
||||
import JSON5 from 'json5';
|
||||
import { type Conversion, cleanHex, decodeNumber, decodeStruct, encodeStruct } from './hex-converter.service';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
|
||||
const mode = ref<'simple' | 'struct'>('simple');
|
||||
|
||||
const bits = ref(32);
|
||||
const floatingPoint = ref(false);
|
||||
const signed = ref(false);
|
||||
const bigEndian = ref(false);
|
||||
const decodeAs = ref<'dec' | 'bin' | 'hexa' | 'char' | 'utf8'>('dec');
|
||||
|
||||
const uppercase = ref(false);
|
||||
const grouping = ref(1);
|
||||
const rowlength = ref(0);
|
||||
|
||||
const hexInput = ref('');
|
||||
const decodedOutput = computed(() => {
|
||||
try {
|
||||
const buffer = hexArray.fromString(cleanHex(hexInput.value));
|
||||
if (decodeAs.value === 'utf8') {
|
||||
return unpackString(buffer);
|
||||
}
|
||||
else {
|
||||
return unpackArray(buffer, {
|
||||
bits: bits.value,
|
||||
fp: floatingPoint.value,
|
||||
signed: signed.value,
|
||||
be: bigEndian.value,
|
||||
}, 0, buffer.length, true).map(n => decodeNumber(n, bits.value, decodeAs.value as Conversion)).join(' ');
|
||||
}
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
const numberInput = ref('');
|
||||
const encodedOutput = computed(() => {
|
||||
try {
|
||||
const values = numberInput.value.split(/\s+/).map(Number);
|
||||
return hexArray.toString(
|
||||
new Uint8Array(
|
||||
packArray(values, {
|
||||
bits: bits.value,
|
||||
fp: floatingPoint.value,
|
||||
signed: signed.value,
|
||||
be: bigEndian.value,
|
||||
})),
|
||||
{
|
||||
uppercase: uppercase.value,
|
||||
grouping: grouping.value,
|
||||
rowlength: rowlength.value,
|
||||
},
|
||||
);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
|
||||
const stringInput = ref('');
|
||||
const utf8Output = computed(() => {
|
||||
try {
|
||||
return hexArray.toString(
|
||||
new Uint8Array(packString(stringInput.value)),
|
||||
{
|
||||
uppercase: uppercase.value,
|
||||
grouping: grouping.value,
|
||||
rowlength: rowlength.value,
|
||||
},
|
||||
);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
|
||||
const structDefinition = ref(`{
|
||||
x: "int32",
|
||||
y: "int32",
|
||||
}`);
|
||||
const structDefinitionValidation = useValidation({
|
||||
source: structDefinition,
|
||||
rules: [
|
||||
{
|
||||
message: 'Struct definition is not a valid JSON',
|
||||
validator: value => JSON5.parse(value.trim()),
|
||||
},
|
||||
],
|
||||
});
|
||||
const hexStructInput = ref('');
|
||||
const decodedStructOutput = computed(() => {
|
||||
try {
|
||||
return JSON.stringify(
|
||||
decodeStruct({
|
||||
struct: JSON5.parse(structDefinition.value),
|
||||
hexArray: hexArray.fromString(cleanHex(hexStructInput.value)),
|
||||
}),
|
||||
null, 2);
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
|
||||
const jsonStructInput = ref('');
|
||||
const encodedStructOutput = computed(() => {
|
||||
try {
|
||||
return hexArray.toString(
|
||||
encodeStruct({
|
||||
struct: JSON5.parse(structDefinition.value),
|
||||
jsonObject: JSON5.parse(jsonStructInput.value),
|
||||
}), {
|
||||
uppercase: uppercase.value,
|
||||
grouping: grouping.value,
|
||||
rowlength: rowlength.value,
|
||||
});
|
||||
}
|
||||
catch (e: any) {
|
||||
return e.toString();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-radio-group v-model:value="mode" name="radiogroup" mb-2 flex justify-center>
|
||||
<n-space>
|
||||
<n-radio
|
||||
value="simple"
|
||||
label="Simple Encoder/Decoder"
|
||||
/>
|
||||
<n-radio
|
||||
value="struct"
|
||||
label="C/C++ typed struct"
|
||||
/>
|
||||
</n-space>
|
||||
</n-radio-group>
|
||||
|
||||
<div v-if="mode === 'simple'">
|
||||
<c-card title="Hex Options" mb-1>
|
||||
<c-select
|
||||
v-model:value="decodeAs"
|
||||
label="Decode/Encode As:"
|
||||
label-position="left" mb-1
|
||||
:options="[{ value: 'dec', label: 'Decimal' }, { value: 'bin', label: 'Binary' }, { value: 'hex', label: 'Hexadecimal' }, { value: 'char', label: 'Char/ASCII' }, { value: 'utf8', label: 'UTF8 string' }]"
|
||||
/>
|
||||
<n-space v-if="decodeAs !== 'utf8'" align="baseline" justify="center">
|
||||
<n-form-item label="Bits:" label-placement="left">
|
||||
<n-input-number v-model:value="bits" :min="1" style="width: 6em" />
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-checkbox v-model:checked="floatingPoint">
|
||||
Floating Point
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-checkbox v-model:checked="signed">
|
||||
Signed
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-checkbox v-model:checked="bigEndian">
|
||||
Big Endian
|
||||
</n-checkbox>
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
</c-card>
|
||||
<c-card title="Hex Data Decoder" mb-3>
|
||||
<c-input-text
|
||||
v-model:value="hexInput"
|
||||
multiline
|
||||
placeholder="Put your Hex data here..."
|
||||
rows="2"
|
||||
label="Hex Data to decode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Your decoded values:">
|
||||
<textarea-copyable :value="decodedOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card v-if="decodeAs !== 'utf8'" title="Hex Data Encoder" mt-3>
|
||||
<c-input-text
|
||||
v-model:value="numberInput"
|
||||
multiline
|
||||
placeholder="Put your Numbers array here..."
|
||||
rows="2"
|
||||
label="Numbers array to encode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Your encoded numbers array as Hex:">
|
||||
<textarea-copyable :value="encodedOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card v-if="decodeAs === 'utf8'" title="Hex UTF8 String Encoder" mt-3>
|
||||
<c-input-text
|
||||
v-model:value="stringInput"
|
||||
multiline
|
||||
placeholder="Put your text here..."
|
||||
rows="5"
|
||||
label="String to encode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Your encoded string as UTF8 Hex:">
|
||||
<textarea-copyable :value="utf8Output" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card title="Hex Encoding Output" mt-1>
|
||||
<n-space align="baseline" justify="center">
|
||||
<n-form-item label="Uppercase" label-placement="left">
|
||||
<n-switch v-model:value="uppercase" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Group by" label-placement="left">
|
||||
<n-input-number v-model:value="grouping" :min="0" style="width: 6em" mr-1 /> digits (0 = no grouping)
|
||||
</n-form-item>
|
||||
<n-form-item label="Split as rows by" label-placement="left">
|
||||
<n-input-number v-model:value="rowlength" :min="0" style="width: 6em" mr-1 /> group of digits (0 = no rows)
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
</c-card>
|
||||
</div>
|
||||
|
||||
<div v-if="mode === 'struct'">
|
||||
<c-card title="Struct Definition">
|
||||
<c-input-text
|
||||
v-model:value="structDefinition"
|
||||
multiline
|
||||
placeholder="Put your Struct defintion here..."
|
||||
rows="5"
|
||||
label="C/C+ like struct definition"
|
||||
raw-text
|
||||
mb-5
|
||||
:validation="structDefinitionValidation"
|
||||
/>
|
||||
|
||||
<details>
|
||||
<summary>Instructions</summary>
|
||||
<n-p>
|
||||
Define you struct definition in JSON format: keys = struct member names ; value = type
|
||||
<br>
|
||||
Types syntax: u?int{size}(be)? | float(be)? | double(be)? | char | wchar(be)? | <type>[{array size}]
|
||||
<br>
|
||||
where "u" means "unsigned" ; "be" means "Big Endian" ; {size} is number of bits ; {array size} fixed size for arrays
|
||||
<br>
|
||||
can prefix integer with 0x or 0b to display as hex and binary
|
||||
</n-p>
|
||||
</details>
|
||||
</c-card>
|
||||
<c-card title="Hex Struct Decoder" m-t-1>
|
||||
<c-input-text
|
||||
v-model:value="hexStructInput"
|
||||
multiline
|
||||
placeholder="Put your Hex data here..."
|
||||
rows="5"
|
||||
label="Hex Data to decode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Your decoded values:">
|
||||
<textarea-copyable :value="decodedStructOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card title="Hex Struct Encoder" m-t-1>
|
||||
<c-input-text
|
||||
v-model:value="jsonStructInput"
|
||||
multiline
|
||||
placeholder="Put your Struct to encode here..."
|
||||
rows="5"
|
||||
label="Struct json to encode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<n-form-item label="Your encoded struct as Hex:">
|
||||
<textarea-copyable :value="encodedStructOutput" />
|
||||
</n-form-item>
|
||||
</c-card>
|
||||
<c-card title="Hex Encoding Output" mt-1>
|
||||
<n-space align="baseline" justify="center">
|
||||
<n-form-item label="Uppercase" label-placement="left">
|
||||
<n-switch v-model:value="uppercase" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Group by" label-placement="left">
|
||||
<n-input-number v-model:value="grouping" :min="0" style="width: 6em" mr-1 /> digits (0 = no grouping)
|
||||
</n-form-item>
|
||||
<n-form-item label="Split as rows by" label-placement="left">
|
||||
<n-input-number v-model:value="rowlength" :min="0" style="width: 6em" mr-1 /> group of digits (0 = no rows)
|
||||
</n-form-item>
|
||||
</n-space>
|
||||
</c-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Binary } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Hex Encoder/Decoder',
|
||||
path: '/hex-converter',
|
||||
description: 'Encode and decode Hex buffers to number (bits, endianess, sign or floating point or chars) and structures',
|
||||
keywords: ['hex', 'encode', 'decode', 'endianess', 'float', 'bits', 'hex', 'struct'],
|
||||
component: () => import('./hex-converter.vue'),
|
||||
icon: Binary,
|
||||
createdAt: new Date('2025-02-09'),
|
||||
});
|
||||
@@ -26,6 +26,7 @@ import { tool as floatingPointNumberConverter } from './floating-point-number-co
|
||||
import { tool as snowflakeIdExtractor } from './snowflake-id-extractor';
|
||||
import { tool as qrContactInfoGenerator } from './qr-contact-info-generator';
|
||||
import { tool as emailNormalizer } from './email-normalizer';
|
||||
import { tool as hexConverter } from './hex-converter';
|
||||
import { tool as sharepointDecoder } from './sharepoint-decoder';
|
||||
import { tool as jwtGenerator } from './jwt-generator';
|
||||
import { tool as gptTokenEstimator } from './gpt-token-estimator';
|
||||
@@ -302,6 +303,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
timezoneConverter,
|
||||
baseConverter,
|
||||
floatingPointNumberConverter,
|
||||
hexConverter,
|
||||
romanNumeralConverter,
|
||||
base64StringConverter,
|
||||
base64FileConverter,
|
||||
|
||||
Reference in new issue
Block a user