github.com/avahowell/sia@v0.5.1-beta.0.20160524050156-83dcc3d37c94/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 }