Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/option/vim/mod.ts>cryptmethod

๐Ÿ“š Standard module for denops.vim
Go to Latest
variable cryptmethod
import { cryptmethod } from "https://deno.land/x/denops_std@v3.9.0/option/vim/mod.ts";

Method used for encryption when the buffer is written to a file: zip PkZip compatible method. A weak kind of encryption. Backwards compatible with Vim 7.2 and older. blowfish Blowfish method. Medium strong encryption but it has an implementation flaw. Requires Vim 7.3 or later, files can NOT be read by Vim 7.2 and older. This adds a "seed" to the file, every time you write the file the encrypted bytes will be different. blowfish2 Blowfish method. Medium strong encryption. Requires Vim 7.4.401 or later, files can NOT be read by Vim 7.3 and older. This adds a "seed" to the file, every time you write the file the encrypted bytes will be different. The whole undo file is encrypted, not just the pieces of text. xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication Code. Medium strong till strong encryption. Encryption is provided by the libsodium library, it requires Vim to be built with |+sodium| It adds a seed and a message authentication code (MAC) to the file. This needs at least a Vim 8.2.3022 to read the encrypted file. Encryption of swap files is not supported, therefore no swap file will be used when xchacha20 encryption is enabled. Encryption of undo files is not yet supported, therefore no undo file will currently be written. CURRENTLY EXPERIMENTAL: Files written with this method might have to be read back with the same version of Vim if the binary format changes later.