Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/berendsliedrecht/nullize-ts
Zeroize memory inside TypeScript
https://github.com/berendsliedrecht/nullize-ts
Last synced: about 1 month ago
JSON representation
Zeroize memory inside TypeScript
- Host: GitHub
- URL: https://github.com/berendsliedrecht/nullize-ts
- Owner: berendsliedrecht
- License: mit
- Created: 2023-10-31T18:27:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-01T08:59:50.000Z (about 1 year ago)
- Last Synced: 2024-10-15T16:10:51.884Z (3 months ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nullize
Inspired by [zeroize](https://github.com/RustCrypto/utils/tree/master/zeroize), but dumb.
> NOTE: this library has not been properly tested and should be seen as an experiment
> Only works with TypeScript ~5.2.2A simple library that enables zeroing out memory when the Garbage Collector cleans it up.
## Usage
```typescript
import "nullize";{
using privateKey = Uint8Array.from([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
// privateKey is defined
// ...
// GC cleanup time
}// Memory of privateKey is `[0,0,0,0,0,0,0,0,0,0]`
```