* @param {string | object} V - The hash algorithm identifier (string or object). * @param {string} label - The dictionary name for the error message.
(V, label)
| 68 | * @param {string} label - The dictionary name for the error message. |
| 69 | */ |
| 70 | function ensureSHA(V, label) { |
| 71 | const name = typeof V === 'string' ? V : V.name; |
| 72 | if (typeof name !== 'string' || |
| 73 | !StringPrototypeStartsWith(StringPrototypeToLowerCase(name), 'sha')) |
| 74 | throw lazyDOMException( |
| 75 | `Only SHA hashes are supported in ${label}`, 'NotSupportedError'); |
| 76 | } |
| 77 | |
| 78 | converters.AlgorithmIdentifier = (V, opts) => { |
| 79 | // Union for (object or DOMString) |
no test coverage detected
searching dependent graphs…