gitlab.com/SiaPrime/SiaPrime@v1.4.1/crypto/discard.go (about) 1 package crypto 2 3 // SecureWipe destroys the data contained within a byte slice. There are no 4 // strong guarantees that all copies of the memory have been eliminated. If the 5 // OS was doing context switching or using swap space the keys may still be 6 // elsewhere in memory. 7 func SecureWipe(data []byte) { 8 for i := range data { 9 data[i] = 0 10 } 11 }