secureZero
Sets a slice to zeroes. Prevents the store from being optimized out.
Function parameters
Parameters
- T:type
- s:[]volatile T
Type definitions in this namespace
Types
- aead
- Authenticated Encryption with Associated Data
- auth
- Authentication (MAC) functions.
- core
- Core functions, that should rarely be used directly by applications.
- dh
- Diffie-Hellman key exchange functions.
- kem
- Key Encapsulation Mechanisms.
- ecc
- Elliptic-curve arithmetic.
- hash
- Hash functions.
- kdf
- Key derivation functions.
- onetimeauth
- MAC functions requiring single-use secret keys.
- pwhash
- A password hashing function derives a uniform key from low-entropy input material such as passwords.
- sign
- Digital signature functions.
- stream
- Stream ciphers.
- ff
- Finite-field arithmetic.
- codecs
- Encoding and decoding
- SideChannelsMitigations
- Side-channels mitigations.
Sets a slice to zeroes.
Functions
- secureZero
- Sets a slice to zeroes.
This is a thread-local, cryptographically secure pseudo random number generator.
Values
- random
- This is a thread-local, cryptographically secure pseudo random number generator.
- default_side_channels_mitigations
- = .medium
Source
Implementation
pub fn secureZero(comptime T: type, s: []volatile T) void {
@memset(s, 0);
}