https://github.com/quininer/seckey
Use `memsec` protected secret memory.
https://github.com/quininer/seckey
memory-management rust secret
Last synced: over 1 year ago
JSON representation
Use `memsec` protected secret memory.
- Host: GitHub
- URL: https://github.com/quininer/seckey
- Owner: quininer
- License: mit
- Created: 2016-08-30T07:35:00.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T09:36:52.000Z (over 3 years ago)
- Last Synced: 2024-10-11T12:21:39.626Z (over 1 year ago)
- Topics: memory-management, rust, secret
- Language: Rust
- Homepage:
- Size: 72.3 KB
- Stars: 26
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# seckey
[](https://travis-ci.org/quininer/seckey)
[](https://ci.appveyor.com/project/quininer/seckey)
[](https://crates.io/crates/seckey)
[](https://github.com/quininer/seckey/blob/master/LICENSE)
[](https://docs.rs/seckey/)
Use [memsec](https://github.com/quininer/memsec) protected secret memory.
### exmaple
```rust
use seckey::SecBytes;
let mut secpass = SecBytes::with(1, |buf| buf.copy_from_slice(&[8; 8][..]));
{
assert_eq!([8u8; 8], *secpass.read());
}
{
let mut wpass = secpass.write();
wpass[0] = 0;
assert_eq!([0, 8, 8, 8, 8, 8, 8, 8], *wpass);
}
```