package ige

Import Path
	github.com/gotd/ige (on go.dev)

Dependency Relation
	imports 3 packages, and imported by 2 packages

Involved Source Files decrypt.go encrypt.go ige.go
Package-Level Type Names (total 4, in which 1 is exported)
/* sort exporteds by: | */
IGE satisfies the cipher.BlockMode interface from the crypto/cipher package. BlockSize returns the mode's block size. CryptBlocks encrypts or decrypts a number of blocks. The length of src must be a multiple of the block size. Dst and src must overlap entirely or not at all. If len(dst) < len(src), CryptBlocks should panic. It is acceptable to pass a dst bigger than src, and in that case, CryptBlocks will only update dst[:len(src)] and will not touch the rest of dst. Multiple calls to CryptBlocks behave as if the concatenation of the src buffers was passed in a single run. That is, BlockMode maintains state and does not reset at each CryptBlocks call. crypto/cipher.BlockMode (interface) IGE : crypto/cipher.BlockMode func NewIGEDecrypter(b cipher.Block, iv []byte) IGE func NewIGEEncrypter(b cipher.Block, iv []byte) IGE
Package-Level Functions (total 6, in which 4 are exported)
DecryptBlocks is a simple shorthand for IGE decrypting. Note: unlike NewIGEDecrypter, DecryptBlocks does NOT COPY iv. So you must not modify passed iv.
EncryptBlocks is a simple shorthand for IGE encrypting. Note: unlike NewIGEEncrypter, EncryptBlocks does NOT COPY iv. So you must not modify passed iv.
NewIGEDecrypter returns an IGE cipher.BlockMode which decrypts using IGE and the given cipher.Block. Note: iv must contain two iv values for IGE (concatenated), otherwise this function will panic. See ErrInvalidIV for more information.
NewIGEEncrypter returns an IGE cipher.BlockMode which encrypts using IGE and the given cipher.Block. Note: iv must contain two iv values for IGE (concatenated), otherwise this function will panic. See ErrInvalidIV for more information.
Package-Level Variables (only one, which is exported)
ErrInvalidIV is displayed as the panic message if the initialization vector passed to NewIGEEncrypter or NewIGEDecrypter doesn't fulfill the length requirements for IGE. IGE uses a two step xor process, so the first initialization vector is the first half, and the second initialization vector is the second half. This requires the initialization vector to be twice as long as the block size.