(alg)
| 62 | } |
| 63 | |
| 64 | function supportsEncapsulatedRawSecret(alg) { |
| 65 | if (!supportsRawSecret(alg)) return false; |
| 66 | switch (alg?.name?.toLowerCase?.()) { |
| 67 | case 'hmac': |
| 68 | case 'kmac128': |
| 69 | case 'kmac256': |
| 70 | return typeof alg.length !== 'number' || Math.ceil(alg.length / 8) === 32; |
| 71 | default: |
| 72 | return true; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | for (const encap of vectors.encapsulateBits) { |
| 77 | for (const imp of vectors.importKey) { |
no test coverage detected