Skip to content

Commit

Permalink
tiny code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Mar 7, 2024
1 parent f97a52d commit a299c96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/key-utils/src/x509/rsa-signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ export class RSASigner {
}

private getImportParams(): AlgorithmIdentifier | RsaPssParams | RsaHashedImportParams {
const importParams = {name: this.hashAlgorithm} as RsaHashedImportParams;
if (this.scheme === 'RSA-PSS') {
return { name: this.scheme, saltLength: 32, hash: {name: this.hashAlgorithm} as RsaHashedImportParams }
return {name: this.scheme, saltLength: 32, hash: importParams}
}
// console.log({ name: this.scheme /*, hash: this.hashAlgorithm*/ })
return { name: this.scheme , hash: {name: this.hashAlgorithm} as RsaHashedImportParams }
return {name: this.scheme, hash: importParams}
}

private async getKey(): Promise<CryptoKey> {
Expand Down

0 comments on commit a299c96

Please sign in to comment.