KhoaNguyen55/zage
A zig implementation of age encryption
refsThe format specification is at age-encryption.org/v1. age was designed by @Benjojo and @FiloSottile.
Download executable from here.
Clone the repo: git clone https://github.com/KhoaNguyen55/zage.git
Use zig build system: zig build -Dbuild-cli --release=fast
There is 3 command: keygen, encrypt, and decrypt
For complete usage run zage <command> --help
zage keygenzage keygen my_keyzage keygen > my_keyWith passphrase: zage encrypt -p -o <output_file> <input_file>
With recipient: zage -r <public_key> -o <output_file> <input_file>
zage encrypt -r age1fmm3lmxh7rtzf7g6829tlr6a9mljq9xt4hd3yw7ffx9vgaywfeaqhg7dd3 text.txtzage encrypt -i my_key -o msg.age text.txtecho 'hello world!' | zage encrypt -i my_key -o msg.age --stdinWith passphrase: zage decrypt <input_file>
With recipient: zage decrypt -i <private_key_file> <input_file>
zage decrypt -i my_key msg.agecat msg.age | zage decrypt -i my_key --stdinThe library is for zig v0.14.1 for now.
To install as a zig library you can run the zig fetch command:
zig fetch --save https://github.com/KhoaNguyen55/zage/archive/refs/tags/<tag>.tar.gz
Then add the following to build.zig:
const age = b.dependency("age", .{
.target = target,
.optimize = optimize,
});
exe_mod.addImport("age", age.module("age"));
// exe_mod.addImport("age_plugin", age.module("age_plugin")); // uncomment if you're developing a plugin
Report bugs at https://github.com/KhoaNguyen55/zage/issues
Contributing: TODO