()
| 69 | }; |
| 70 | |
| 71 | const generateRandom = () => { |
| 72 | const cryptoObj = window.crypto || window.Crypto; |
| 73 | const b = new Uint8Array(4); |
| 74 | cryptoObj.getRandomValues(b); |
| 75 | |
| 76 | const key = Buffer.from(b).toString("hex"); |
| 77 | setValue(key); |
| 78 | updateField(key); |
| 79 | }; |
| 80 | |
| 81 | const copyToClipboard = () => { |
| 82 | const bytes = value.match(/[A-Fa-f0-9]{2}/g); |
nothing calls this directly
no test coverage detected