Skip to content

Commit

Permalink
remove debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
0x471 committed Aug 30, 2024
1 parent 13f2b18 commit ece6493
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/chacha20.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { chacha20, chacha20Block, ChaChaState } from './chacha20';

jest.useFakeTimers();

export { toHexString }
function toHexString(value: UInt32): string {
const numberValue = value.toBigint();
return numberValue.toString(16).padStart(8, '0');
Expand Down Expand Up @@ -157,9 +156,6 @@ describe('ChaCha', () => {
0x742e0000
]);
let chachaStateEncrypted = chacha20(keyArray, nonceArray, counter, plaintext);
// for (let x = 0; x < chachaStateEncrypted.length; x++) {
// console.log(toHexString(UInt32.from(chachaStateEncrypted[x])))
// }
let chachaStateDecrypted = chacha20(keyArray, nonceArray, counter, chachaStateEncrypted);
for (let i = 0; i < chachaStateDecrypted.length; i++) {
expect(toHexString(UInt32.from(chachaStateDecrypted[i]))).toBe(toHexString(UInt32.from(plaintext[i])))
Expand Down

0 comments on commit ece6493

Please sign in to comment.