Improve UX of gen-random; add note to readme
This commit is contained in:
parent
6e8bab5245
commit
31117082f0
2 changed files with 3 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ The reason to pick numbers at random is to minimize risk of collisions
|
|||
in the wild. Do not pick random numbers by banging on keyboard, or by using
|
||||
`0xdeadf00d`, `0x42424242` etc. A good way is to use the following
|
||||
shell command: `printf "0x%04x%04x\n" $RANDOM $RANDOM`
|
||||
Another good way is the link at the bottom of https://microsoft.github.io/uf2/patcher/
|
||||
This procedure was unfortunately not used for the SAMD51 and NRF52840 below.
|
||||
|
||||
#### Family list
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ function savePatch(ev) {
|
|||
localStorage["UF2_PATCH"] = text.value
|
||||
}
|
||||
|
||||
function genRnd() {
|
||||
function genRnd(ev) {
|
||||
ev.preventDefault()
|
||||
let vals = new Uint32Array(1)
|
||||
window.crypto.getRandomValues(vals)
|
||||
document.getElementById("rnd-res").textContent = "Random number: 0x" +
|
||||
|
|
|
|||
Loading…
Reference in a new issue