| 14420 | (self.name === that.name && self.hash?.name === that.hash?.name && self.saltLength === that.saltLength) |
| 14421 | |
| 14422 | const cryptoAlgorithmPayload = (algorithm: CryptoAlgorithm): Json => { |
| 14423 | const payload: { [key: string]: Json } = { name: algorithm.name } |
| 14424 | if (algorithm.hash !== undefined) payload.hash = algorithm.hash.name |
| 14425 | if (algorithm.modulusLength !== undefined) payload.modulusLength = algorithm.modulusLength |
| 14426 | if (algorithm.saltLength !== undefined) payload.saltLength = algorithm.saltLength |
| 14427 | return payload |
| 14428 | } |
| 14429 | |
| 14430 | const declareCryptoKey = <K extends { readonly algorithm: CryptoAlgorithm }>( |
| 14431 | name: string, |