github.com/hyperledger/aries-framework-go@v0.3.2/pkg/crypto/tinkcrypto/primitive/aead/subtle/gojose_aes_cbc_hmac.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  // AESCBCHMAC is an implementation of AEAD interface.
    14  type AESCBCHMAC = subtle.AESCBCHMAC
    15  
    16  // NewAESCBCHMAC returns an AES CBC HMAC instance.
    17  // The key argument should be the AES key, either 16, 24 or 32 bytes to select AES-128, AES-192 or AES-256.
    18  // ivSize specifies the size of the IV in bytes.
    19  func NewAESCBCHMAC(key []byte) (*AESCBCHMAC, error) {
    20  	return subtle.NewAESCBCHMAC(key)
    21  }