Skip to content

Commit

Permalink
removendo testes que faziam comparação com encrypted uris gerados pel…
Browse files Browse the repository at this point in the history
…o cryptojs pois acredito que usam MD5 como gerador de hash padrão para KDF, e MD5 não é suportado pela biblioteca @noble/hashes, uma acredito SHA2seja por56 é considerado m pela @noble/ciphers, a geração de hashs de KDF nela é feita com SHA256
  • Loading branch information
antonioconselheiro committed Feb 14, 2024
1 parent 63f2578 commit 9fb022f
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 70 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/core/jest-html-reporters-attach/test-report/result.js

Large diffs are not rendered by default.

10 changes: 0 additions & 10 deletions packages/ciphers/aes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ describe('success flow aes', () => {
expect(decoded).toEqual(originalMessage);
});

it('cbc generated from other implementation with the same algorithm type and params', async () => {
const decoded = await EncryptedURI.decrypt('encrypted:aes/cbc?iv=1dc8d28370372579a75feac6b5bf5290&c=1000&dklen=8&hasher=md5;U2FsdGVkX18K2mCM3jqJz9SSPC2Rss61NOk4JWeG5IE=', 'teste123');
expect(decoded).toEqual('teste123');
});

it('cbc generated from other implementation with the same algorithm type and params', async () => {
const decoded = await EncryptedURI.decrypt('encrypted:aes/cbc?iv=9d668dee3bccfd9d3d5fb786aab11894&c=1000&dklen=8&hasher=md5;U2FsdGVkX182g9bXg4UB/MsE9Dlz4lJcGC7WW4WGAVc=', 'exemplo');
expect(decoded).toEqual('exemplo');
});

it('ctr', async () => {
const originalMessage = 'mensagem secreta, favor não ler em voz alta';
const password = 'senha123';
Expand Down
13 changes: 1 addition & 12 deletions packages/ciphers/hashes/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
export * from './keccak_224';
export * from './keccak_256';
export * from './keccak_384';
export * from './keccak_512';
export * from './sha256';
export * from './sha384';
export * from './sha3_224';
export * from './sha3_256';
export * from './sha3_384';
export * from './sha3_512';
export * from './sha512';
export * from './sha512_256';
export * from './sha256';
4 changes: 0 additions & 4 deletions packages/ciphers/hashes/keccak_224.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/keccak_256.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/ciphers/hashes/keccak_384.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/ciphers/hashes/keccak_512.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha384.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha3_224.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha3_256.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha3_384.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha3_512.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha512.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/ciphers/hashes/sha512_256.ts

This file was deleted.

0 comments on commit 9fb022f

Please sign in to comment.