...

Source file src/crypto/aes/modes.go

Documentation: crypto/aes

		 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.
		 4  
		 5  package aes
		 6  
		 7  import (
		 8  	"crypto/cipher"
		 9  )
		10  
		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)
		16  }
		17  
		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
		23  }
		24  
		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
		30  }
		31  
		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
		37  }
		38  

View as plain text