keyvault

package
v1.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJWKEncryptionAlgorithm

func GetJWKEncryptionAlgorithm(algorithm string) *azkeys.EncryptionAlgorithm

GetJWKEncryptionAlgorithm returns a JSONWebKeyEncryptionAlgorithm constant is the algorithm is a supported one.

func GetJWKSignatureAlgorithm

func GetJWKSignatureAlgorithm(algorithm string) *azkeys.SignatureAlgorithm

GetJWKSignatureAlgorithm returns a JSONWebKeySignatureAlgorithm constant is the algorithm is a supported one.

func IsAlgorithmAsymmetric

func IsAlgorithmAsymmetric[T algorithms](algorithm T) bool

IsAlgorithmAsymmetric returns true if the algorithm identifier is asymmetric.

func IsECKey

func IsECKey(kt azkeys.KeyType) bool

IsECKey returns true if the key is an EC key (EC or EC-HSM).

func IsRSAKey

func IsRSAKey(kt azkeys.KeyType) bool

IsRSAKey returns true if the key is an RSA key (RSA or RSA-HSM).

func KeyBundleToKey

func KeyBundleToKey(bundle *azkeys.KeyBundle) (*contribCrypto.Key, error)

KeyBundleToKey converts an azkeys.KeyBundle object to a contribCrypto.Key object, containing only the public part of the asymmetric key.

func NewAzureKeyvaultCrypto

func NewAzureKeyvaultCrypto(logger logger.Logger) contribCrypto.SubtleCrypto

NewAzureKeyvaultCrypto returns a new Azure Key Vault crypto provider.

Types

type JSONWebKey

type JSONWebKey struct {
	azkeys.JSONWebKey
}

JSONWebKey extends azkeys.JSONWebKey to add methods to export the key.

func (JSONWebKey) Public

func (key JSONWebKey) Public() (crypto.PublicKey, error)

Public returns the public key included the object, as a crypto.PublicKey object. This method returns an error if it's invoked on a JSONWebKey object representing a symmetric key.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL