Home | History | Annotate | Download | only in cipher

Lines Matching refs:block

7 // CTR converts a block cipher into a stream cipher by
16 b Block
31 // NewCTR returns a Stream which encrypts/decrypts using the given Block in
32 // counter mode. The length of iv must be the same as the Block's block size.
33 func NewCTR(block Block, iv []byte) Stream {
34 if ctr, ok := block.(ctrAble); ok {
37 if len(iv) != block.BlockSize() {
38 panic("cipher.NewCTR: IV length must equal block size")
41 if bufSize < block.BlockSize() {
42 bufSize = block.BlockSize()
45 b: block,