(pem: string, max_length?: number)
| 122 | } |
| 123 | |
| 124 | function x509key_to_uint8array(pem: string, max_length?: number) { |
| 125 | const content = pem.replace(/-----BEGIN PRIVATE KEY-----/, '') |
| 126 | .replace(/-----END PRIVATE KEY-----/, '') |
| 127 | .replace(/\n/g, ''); |
| 128 | const binaryDer = atob(content) |
| 129 | if (!max_length) { |
| 130 | max_length = binaryDer.length |
| 131 | } |
| 132 | const result = new Uint8Array(max_length) |
| 133 | for (let i = 0; i < max_length; i++) { |
| 134 | result[i] = binaryDer.charCodeAt(i) |
| 135 | } |
| 136 | return result |
| 137 | } |
| 138 | |
| 139 | function replay_rtmr(history: string[]): string { |
| 140 | const INIT_MR = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" |
no outgoing calls
no test coverage detected