github.com/trustbloc/kms-go@v1.1.2/crypto/tinkcrypto/primitive/aead/aead.go (about)

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  // Package aead provides implementations of the AEAD primitive.
     8  //
     9  // AEAD encryption assures the confidentiality and authenticity of the data. This primitive is CPA secure.
    10  package aead
    11  
    12  import (
    13  	"fmt"
    14  
    15  	"github.com/google/tink/go/core/registry"
    16  )
    17  
    18  // TODO - find a better way to setup tink than init.
    19  // nolint: gochecknoinits
    20  func init() {
    21  	if err := registry.RegisterKeyManager(newAESCBCHMACAEADKeyManager()); err != nil {
    22  		panic(fmt.Sprintf("aead.init() failed: %v", err))
    23  	}
    24  }