diff options
Diffstat (limited to 'modules/ext/cryptogzip.js')
| -rw-r--r-- | modules/ext/cryptogzip.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/modules/ext/cryptogzip.js b/modules/ext/cryptogzip.js index 6f873ff..b67e067 100644 --- a/modules/ext/cryptogzip.js +++ b/modules/ext/cryptogzip.js @@ -1,9 +1,18 @@ class CryptoGzipModule { // CryptoGzipModule — VFS-level gzip/encrypt commands for WebX11 newOS4 - // Commands: gzip <path>, gunzip <path.gz>, encrypt <path>, decrypt <path.enc> - constructor(terminal) { - this.terminal = terminal; + // Commands: gzip <path>, gunzip <path.gz>, encrypt <path> <passphrase>, decrypt <path.enc> <passphrase> + constructor() { this.commands = {}; + this.terminal = null; + } + + getHelpInfo() { + return { + 'gzip': 'gzip <path> — Compress a VFS file to .gz', + 'gunzip': 'gunzip <path.gz> — Decompress a .gz file', + 'encrypt': 'encrypt <path> <passphrase> — AES-256-GCM encrypt a VFS file', + 'decrypt': 'decrypt <path.enc> <passphrase> — Decrypt a .enc file' + }; } _vfsExists(path) { @@ -279,3 +288,6 @@ class CryptoGzipModule { }; } } +if (typeof window.webx11 !== 'undefined' && window.webx11) { + webx11.moduleManager.registerModule(new CryptoGzipModule(), 'https://webx11.duckdns.org/spaces/newos4/modules/ext/cryptogzip.js'); +} |