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.
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