python: how to encrypt a file?

后端 未结 3 812
梦如初夏
梦如初夏 2021-01-21 06:55

Can anybody help(or point to some examples) about how to encrypt files with python? I have to use following parameters to encrypt file:

block size=8
iv=qwertyui1         


        
3条回答
  •  独厮守ぢ
    2021-01-21 07:08

    IV stands for Initialization Vector. Block cipher algorithms can be used in several operational modes; one of these modes is called CBC (Cipher-Block Chaining), in this mode the plain text block is XORed with the encrypted previous block. The IV is XORed with the initial plain text block. The IV can be see as an algorithm parameter.

    A more detailed description can be read here.

提交回复
热议问题