aboutsummaryrefslogtreecommitdiff
path: root/lua/encrypt/decrypt.lua
diff options
context:
space:
mode:
authorkongjun <kongjun18@outlook.com>2025-05-06 10:10:59 +0000
committerkongjun <kongjun18@outlook.com>2025-05-06 10:10:59 +0000
commitc7a16c626a0379d9304e0337348affb4bde9ba4e (patch)
tree43e4ba24f0db713d720dfacd20565d7e7687cd3c /lua/encrypt/decrypt.lua
parent872632670c31f682f3db01707468dbc12f154ab4 (diff)
downloadencrypt.nvim-c7a16c626a0379d9304e0337348affb4bde9ba4e.tar.gz
feat: support password with special characters
Diffstat (limited to 'lua/encrypt/decrypt.lua')
-rw-r--r--lua/encrypt/decrypt.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/encrypt/decrypt.lua b/lua/encrypt/decrypt.lua
index 72e93c3..de49019 100644
--- a/lua/encrypt/decrypt.lua
+++ b/lua/encrypt/decrypt.lua
@@ -5,7 +5,7 @@ local helpers = require("encrypt.helpers")
---@param password string
local function decrypt_lines(lines, password)
return vim.fn.systemlist(
- "base64 --decode | openssl enc -d -aes-256-cbc -pbkdf2 -salt -in - -out - -k " .. password,
+ "base64 --decode | openssl enc -d -aes-256-cbc -pbkdf2 -salt -in - -out - -k " .. vim.fn.shellescape(password),
lines
)
end