aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/crypto
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-09-15 17:25:34 +0200
committerRon Evans <[email protected]>2022-09-17 06:08:54 +0200
commit91e9c84d85c466a63a1630026608705bd0a7b264 (patch)
tree364681e387e397862ed58b3b1133a8ae29b8e998 /src/crypto
parent4af530f238c68fa2b5f1e048bd04a2a55264b4ec (diff)
downloadtinygo-91e9c84d85c466a63a1630026608705bd0a7b264.tar.gz
tinygo-91e9c84d85c466a63a1630026608705bd0a7b264.zip
nrf: make GetRNG available to all chips
All nrf chips have a cryptographically secure RNG on board. Therefore, I've made the code more portable so that it works on all nrf chips. I did remove a number of exported functions. I am of the opinion that these should only be made available once we have an agreed upon API for multiple chips. People who want to have greater control over the RNG should use the device/nrf package directly instead. I have also changed the behavior to always enable digital error correction. Enabling it seems like a more conservative (and secure) default to me. Again, people who would like to have it disabled can use the device/nrf package directly.
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/rand/rand_baremetal.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/rand/rand_baremetal.go b/src/crypto/rand/rand_baremetal.go
index fe9fea2a0..e41036840 100644
--- a/src/crypto/rand/rand_baremetal.go
+++ b/src/crypto/rand/rand_baremetal.go
@@ -1,5 +1,5 @@
-//go:build nrf52840 || stm32 || (sam && atsamd51) || (sam && atsame5x)
-// +build nrf52840 stm32 sam,atsamd51 sam,atsame5x
+//go:build nrf || stm32 || (sam && atsamd51) || (sam && atsame5x)
+// +build nrf stm32 sam,atsamd51 sam,atsame5x
package rand