Skip to content

Commit

Permalink
Ensure Tombo chs files (in addition to chi files) are supported
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Nov 25, 2024
1 parent c6e1a3f commit 25d5fec
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ Compatible with http://tombo.osdn.jp/En/ (and others, for example, Kumagusu on A

ptcipher -v -p test README.chi

The chi file can also be read/written by Tombo http://tombo.sourceforge.jp/En/ and clones
The chi/chs file can also be read/written by Tombo http://tombo.sourceforge.jp/En/ and clones (for example, Kumagusu).


#### ccrypt CPT
Expand Down
4 changes: 2 additions & 2 deletions integrations/scite/pt_scite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ end

local function determine_encrypted_file_extensions()
local hard_coded_file_extensions = true
--local hard_coded_file_extensions = false
local hard_coded_file_extensions = false
if hard_coded_file_extensions == true then
-- avoids process spawning unless an actual encrypted file is loaded
return {
'gz', 'Z', -- no password needed, no encryption
'chi', 'aes.zip', 'aes256.zip', 'aeszip', 'old.zip', 'aes256stored.zip', 'oldstored.zip', 'aes256lzma.zip', 'aes256bzip2.zip', 'vimcrypt', 'vimcrypt1', 'vimcrypt2', 'vimcrypt3'
'chi', 'chs', 'aes.zip', 'aes256.zip', 'aeszip', 'old.zip', 'aes256stored.zip', 'oldstored.zip', 'aes256lzma.zip', 'aes256bzip2.zip', 'vimcrypt', 'vimcrypt1', 'vimcrypt2', 'vimcrypt3'
}
end
local file_extensions = {}
Expand Down
8 changes: 4 additions & 4 deletions integrations/vim/pt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ endfunction


" potentially filter aes zip to *aeszip
autocmd BufReadPre,FileReadPre *.chi,*.asc,*.gpg,*zip call s:PurenTonboReadPre()
autocmd BufReadPost,FileReadPost *.chi,*.asc,*.gpg,*zip call s:PurenTonboReadPost()
autocmd BufWritePre,FileWritePre *.chi,*.asc,*.gpg,*zip call s:PurenTonboWritePre()
autocmd BufWritePost,FileWritePost *.chi,*.asc,*.gpg,*zip call s:PurenTonboWritePost()
autocmd BufReadPre,FileReadPre *.chi,*.chs,*.asc,*.gpg,*zip call s:PurenTonboReadPre()
autocmd BufReadPost,FileReadPost *.chi,*.chs,*.asc,*.gpg,*zip call s:PurenTonboReadPost()
autocmd BufWritePre,FileWritePre *.chi,*.chs,*.asc,*.gpg,*zip call s:PurenTonboWritePre()
autocmd BufWritePost,FileWritePost *.chi,*.chs,*.asc,*.gpg,*zip call s:PurenTonboWritePost()

augroup END
2 changes: 1 addition & 1 deletion puren_tonbo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ class TomboBlowfish(EncryptedFile):
"""

description = 'Tombo Blowfish ECB (not recommended)'
extensions = ['.chi']
extensions = ['.chi', '.chs']

def kdf(self, in_bytes):
return chi_io.CHI_cipher(in_bytes)
Expand Down

0 comments on commit 25d5fec

Please sign in to comment.