Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions plugin/openssl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
" This plugin will fold on wiki-style headlines in the following format:
"
" == This is a headline ==
"
"
" Any notes under the headline will be inside the fold until the next headline
" is reached. The SPACE key will toggle a fold open and closed. The q key will
" quit Vim. Create the following example file named ~/.auth.bfa:
Expand Down Expand Up @@ -65,7 +65,7 @@
" .auth.bfa --> .auth.bak.bfa
"
" To turn on backups put the following global definition in your .vimrc file:
"
"
" let g:openssl_backup = 1
"
" Thanks to Tom Purl for the original des3 tip.
Expand Down Expand Up @@ -102,9 +102,9 @@ function! s:OpenSSLReadPost()
endif
if l:cipher == "bfa"
let l:cipher = "bf"
let l:expr = "0,$!openssl " . l:cipher . " -d -a -salt"
let l:expr = "0,$!openssl " . l:cipher . " -d -md MD5 -a -salt"
else
let l:expr = "0,$!openssl " . l:cipher . " -d -salt"
let l:expr = "0,$!openssl " . l:cipher . " -d -md MD5 -salt"
endif

silent! execute l:expr
Expand Down Expand Up @@ -138,15 +138,15 @@ function! s:OpenSSLWritePre()
silent! execute '!cp % %:r.bak.%:e'
endif

let l:cipher = expand("<afile>:e")
let l:cipher = expand("<afile>:e")
if l:cipher == "aes"
let l:cipher = "aes-256-cbc"
endif
if l:cipher == "bfa"
let l:cipher = "bf"
let l:expr = "0,$!openssl " . l:cipher . " -e -a -salt"
let l:expr = "0,$!openssl " . l:cipher . " -e -md MD5 -a -salt"
else
let l:expr = "0,$!openssl " . l:cipher . " -e -salt"
let l:expr = "0,$!openssl " . l:cipher . " -e -md MD5 -salt"
endif

silent! execute l:expr
Expand Down Expand Up @@ -198,4 +198,3 @@ autocmd BufReadPost,FileReadPost .auth.bfa set updatetime=300000
autocmd CursorHold .auth.bfa quit

augroup END