Home | History | Annotate | Download | only in cipher

Lines Matching refs:AES

8 	"crypto/aes"
18 // The key argument should be the AES key, either 16 or 32 bytes
19 // to select AES-128 or AES-256.
23 block, err := aes.NewCipher(key)
44 // The key argument should be the AES key, either 16 or 32 bytes
45 // to select AES-128 or AES-256.
51 block, err := aes.NewCipher(key)
74 block, err := aes.NewCipher(key)
81 if len(ciphertext) < aes.BlockSize {
84 iv := ciphertext[:aes.BlockSize]
85 ciphertext = ciphertext[aes.BlockSize:]
88 if len(ciphertext)%aes.BlockSize != 0 {
117 if len(plaintext)%aes.BlockSize != 0 {
121 block, err := aes.NewCipher(key)
128 ciphertext := make([]byte, aes.BlockSize+len(plaintext))
129 iv := ciphertext[:aes.BlockSize]
135 mode.CryptBlocks(ciphertext[aes.BlockSize:], plaintext)
148 block, err := aes.NewCipher(key)
155 if len(ciphertext) < aes.BlockSize {
158 iv := ciphertext[:aes.BlockSize]
159 ciphertext = ciphertext[aes.BlockSize:]
173 block, err := aes.NewCipher(key)
180 ciphertext := make([]byte, aes.BlockSize+len(plaintext))
181 iv := ciphertext[:aes.BlockSize]
187 stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext)
198 block, err := aes.NewCipher(key)
205 ciphertext := make([]byte, aes.BlockSize+len(plaintext))
206 iv := ciphertext[:aes.BlockSize]
212 stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext)
223 stream.XORKeyStream(plaintext2, ciphertext[aes.BlockSize:])
233 block, err := aes.NewCipher(key)
240 ciphertext := make([]byte, aes.BlockSize+len(plaintext))
241 iv := ciphertext[:aes.BlockSize]
247 stream.XORKeyStream(ciphertext[aes.BlockSize:], plaintext)
258 stream.XORKeyStream(plaintext2, ciphertext[aes.BlockSize:])
273 block, err := aes.NewCipher(key)
280 var iv [aes.BlockSize]byte
310 block, err := aes.NewCipher(key)
317 var iv [aes.BlockSize]byte