MemSafeCrypto
A subset of BouncyCastle crypto primitives, refactored to use DirectByteBuffer.
Install / Use
/learn @andy-goryachev/MemSafeCryptoREADME
MemSafeCrypto
A subset of BouncyCastle crypto primitives, refactored to use DirectByteBuffer instead of primitive arrays, to avoid leaving sensitive data in memory due to internal copying and garbage compactification done by the JVM.
Summary of Changes
- introducted ICryptoZeroable interface
- created CByteArray, CIntArray, and CLongArray classes based on DirectByteBuffer
- modified BouncyCastle classes to use new array types
Supported Primitives
- Argon2
- Blake2b
- DigestRandomGenerator
- HKDFBytesGenerator
- Poly1305
- Salsa20Engine
- Scrypt
- SHA256Digest
- XSalsa20Engine
Dependencies
None.
(Bouncycastle library is used for tests only).
Original Code
This project is based on BouncyCastle release 1.69:
https://github.com/bcgit/bc-java
Projects That Use MemSafeCrypto
License
The project is licensed under Apache 2.0 license, which I believe is compatible with the BouncyCastle license LICENSE.html.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
