kmsdidkey

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 10 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.

func GetBase58PubKeyFromDIDKey added in v0.1.9

func GetBase58PubKeyFromDIDKey(didKey string) (string, error)

GetBase58PubKeyFromDIDKey parses the did:key DID and returns the key's base58 encoded value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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