Security & Advanced Ops
Hardened security primitives and advanced kernel-level operations. Features include AES-256-GCM encryption, hardware-bound data locking, and secure multi-pass deletion (shredding).
File Encryption (AES-256-GCM)
Encrypt and decrypt files in-place using the native xypriss-security engine.
.encryptFile / .decryptFile
Both operations are performed in-place. The source file is overwritten with the encrypted/decrypted output.
await __sys__.fs.encryptFile("secrets.json", MASTER_KEY);
await __sys__.fs.decryptFile("secrets.json", MASTER_KEY);Hardware-Linked Encryption
Cryptographically binds file content to the host machine's unique HostID.
.hardwareEncryptFile(path, key)
Incorporates the machine's hardware identity into the key derivation. Files **cannot** be decrypted on any other physical server.
await __sys__.fs.hardwareEncryptFile("system.vault", "secret-key");Secure Destruction
.shred(path, passes?)
Secure deletion — overwrites file content with random data N times before removing it from the filesystem.
__sys__.fs.shred("private-key.pem", 7);Advanced Manipulation
.split / .merge
Binary file chunking and reassembly for large data handling.
const chunks = __sys__.fs.split("video.mp4", 10_000_000);.lock / .unlock
Advisory file locking to prevent concurrent write conflicts.
In-place content replacement.
Read the last N lines (logs).
Compare two files line-by-line.
Atomic write with permissions.
Identify largest files in tree.
Master cross-platform path resolution and security boundaries.
