19 lines
341 B
Go
19 lines
341 B
Go
package cbc
|
|
|
|
import (
|
|
`crypto/cipher`
|
|
)
|
|
|
|
// Cipher is an AES128-CBC cipher.Cipher.
|
|
type Cipher struct {
|
|
// key contains the encryption key.
|
|
key []byte
|
|
// iv contains the IV, or initialization vector.
|
|
iv []byte
|
|
/*
|
|
cryptBlock contains the block encryptor.
|
|
CBC is a block (all at once) encryption mode.
|
|
*/
|
|
cryptBlock cipher.Block
|
|
}
|