mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-08-04 04:55:18 +02:00
feat(hash-text): digest base selector (#254)
This commit is contained in:
parent
fad4833ca2
commit
422b6eb05a
3 changed files with 62 additions and 7 deletions
15
src/tools/hash-text/hash-text.service.test.ts
Normal file
15
src/tools/hash-text/hash-text.service.test.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { describe, expect, it } from 'vitest';
|
||||
import { convertHexToBin } from './hash-text.service';
|
||||
|
||||
describe('hash text', () => {
|
||||
describe('convertHexToBin', () => {
|
||||
it('convert hex to bin', () => {
|
||||
expect(convertHexToBin('')).toEqual('');
|
||||
expect(convertHexToBin('FF')).toEqual('11111111');
|
||||
expect(convertHexToBin('F'.repeat(200))).toEqual('1111'.repeat(200));
|
||||
expect(convertHexToBin('2123006AD00F694CE120')).toEqual(
|
||||
'00100001001000110000000001101010110100000000111101101001010011001110000100100000',
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue