Skip to content

Commit

Permalink
chore: update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
gantunesr authored and owencraston committed Mar 26, 2024
1 parent 4c46a5e commit 291298a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/core/Encryptor/Encryptor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Encryptor', () => {
},
}),
).toThrowError(
`Invalid key derivation iterations: 100. The minimum required is ${KeyDerivationIteration.Minimum}.`,
`Invalid key derivation iterations: 100. Recommended number of iterations is ${KeyDerivationIteration.Default}. Minimum required is ${KeyDerivationIteration.Minimum}.`,
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion app/core/Encryptor/Encryptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Encryptor implements GenericEncryptor {
private checkMinimalRequiredIterations = (iterations: number): void => {
if (!this.isMinimalRequiredIterationsMet(iterations)) {
throw new Error(
`Invalid key derivation iterations: ${iterations}. The minimum required is ${KeyDerivationIteration.Minimum}.`,
`Invalid key derivation iterations: ${iterations}. Recommended number of iterations is ${KeyDerivationIteration.Default}. Minimum required is ${KeyDerivationIteration.Minimum}.`,
);
}
};
Expand Down

0 comments on commit 291298a

Please sign in to comment.