cose

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSecretPrivateKey

func ParseSecretPrivateKey(data []byte) (pk *ecdsa.PrivateKey, err error)

ParseSecretPrivateKey parses ecdsa priv key from encrypted data. Data is encrypted with

func SetMasterKey

func SetMasterKey(hexKey string) (err error)

func VerifyHashSig

func VerifyHashSig(key *ecdsa.PublicKey, data, sig []byte) bool

VerifyHashSig verifies signature of data's hash with ecdsa public key. The function is currently used only for testing our signatures are right.

Types

type Key

type Key struct {
	webauthncose.EC2PublicKeyData
	// contains filtered or unexported fields
}

func Must

func Must(k *Key, err error) *Key

func New

func New() (k *Key, err error)

func NewFromData

func NewFromData(data []byte) (k *Key, err error)

func NewFromPrivateKey

func NewFromPrivateKey(priKey *ecdsa.PrivateKey) *Key

func (*Key) Marshal

func (k *Key) Marshal() ([]byte, error)

func (*Key) NewPrivateKey

func (k *Key) NewPrivateKey() (err error)

func (*Key) ParseSecretPrivateKey

func (k *Key) ParseSecretPrivateKey(data []byte) (err error)

func (*Key) Sign

func (k *Key) Sign(data []byte) (s []byte, err error)

func (*Key) TryMarshalSecretPrivateKey

func (k *Key) TryMarshalSecretPrivateKey() []byte

func (*Key) TryParseSecretPrivateKey

func (k *Key) TryParseSecretPrivateKey(data []byte)

func (*Key) Verify

func (k *Key) Verify(data, sig []byte) (ok bool)

Jump to

Keyboard shortcuts

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