github.com/hyperledger/aries-framework-go@v0.3.2/pkg/crypto/tinkcrypto/primitive/aead/subtle/aes_cbc.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package subtle
     8  
     9  import (
    10  	"github.com/hyperledger/aries-framework-go/component/kmscrypto/crypto/tinkcrypto/primitive/aead/subtle"
    11  )
    12  
    13  const (
    14  	// AESCBCIVSize is the IV size that this implementation supports.
    15  	AESCBCIVSize = subtle.AESCBCIVSize
    16  )
    17  
    18  // AESCBC is an implementation of AEAD interface.
    19  type AESCBC = subtle.AESCBC
    20  
    21  // NewAESCBC returns an AESCBC instance.
    22  // The key argument should be the AES key, either 16, 24 or 32 bytes to select
    23  // AES-128, AES-192 or AES-256.
    24  func NewAESCBC(key []byte) (*AESCBC, error) {
    25  	return subtle.NewAESCBC(key)
    26  }