kmsdidkey

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDIDKeyByKeyType

func BuildDIDKeyByKeyType(pubKeyBytes []byte, keyType kms.KeyType) (string, error)

BuildDIDKeyByKeyType creates a did key for pubKeyBytes based on the kms keyType.

func EncryptionPubKeyFromDIDKey

func EncryptionPubKeyFromDIDKey(didKey string) (*cryptoapi.PublicKey, error)

EncryptionPubKeyFromDIDKey parses the did:key DID and returns the key's raw value. note: for NIST P ECDSA keys, the raw value does not have the compression point.

In order to use elliptic.Unmarshal() with the raw value, the uncompressed point ([]byte{4}) must be prepended.
see https://github.com/golang/go/blob/master/src/crypto/elliptic/elliptic.go#L384.

Types

This section is empty.

Jump to

Keyboard shortcuts

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