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

     1  /*
     2  Copyright SecureKey Technologies Inc. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package secp256k1
     8  
     9  import (
    10  	"fmt"
    11  
    12  	"github.com/google/tink/go/core/registry"
    13  )
    14  
    15  // Package secp256k1 provides implementations of the Signer and Verifier
    16  // primitives.
    17  //
    18  // To sign data using Tink you can use the Secp256k1 key templates.
    19  // nolint:gochecknoinits
    20  func init() {
    21  	// ECDSA Secp256K1 key managers.
    22  	if err := registry.RegisterKeyManager(newSecp256K2SignerKeyManager()); err != nil {
    23  		panic(fmt.Sprintf("signature.init() failed: %v", err))
    24  	}
    25  
    26  	if err := registry.RegisterKeyManager(newSecp256K1VerifierKeyManager()); err != nil {
    27  		panic(fmt.Sprintf("signature.init() failed: %v", err))
    28  	}
    29  }