libgo: update to Go 1.11
[official-gcc.git] / libgo / go / crypto / aes / modes.go
blob5c0b08eb6d83844692c371f8607048f91da29fbe
1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package aes
7 import (
8 "crypto/cipher"
11 // gcmAble is implemented by cipher.Blocks that can provide an optimized
12 // implementation of GCM through the AEAD interface.
13 // See crypto/cipher/gcm.go.
14 type gcmAble interface {
15 NewGCM(nonceSize, tagSize int) (cipher.AEAD, error)
18 // cbcEncAble is implemented by cipher.Blocks that can provide an optimized
19 // implementation of CBC encryption through the cipher.BlockMode interface.
20 // See crypto/cipher/cbc.go.
21 type cbcEncAble interface {
22 NewCBCEncrypter(iv []byte) cipher.BlockMode
25 // cbcDecAble is implemented by cipher.Blocks that can provide an optimized
26 // implementation of CBC decryption through the cipher.BlockMode interface.
27 // See crypto/cipher/cbc.go.
28 type cbcDecAble interface {
29 NewCBCDecrypter(iv []byte) cipher.BlockMode
32 // ctrAble is implemented by cipher.Blocks that can provide an optimized
33 // implementation of CTR through the cipher.Stream interface.
34 // See crypto/cipher/ctr.go.
35 type ctrAble interface {
36 NewCTR(iv []byte) cipher.Stream