cose

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

cose contains utility functions related to COSE keys, Section 7 of [RFC8152].

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingKeyType       = fmt.Errorf("cose: missing key type")
	ErrMissingAlgorithm     = fmt.Errorf("cose: missing algorithm")
	ErrUnsupportedKeyType   = fmt.Errorf("cose: unsupported key type")
	ErrUnsupportedAlgorithm = fmt.Errorf("cose: unsupported algorithm")
	ErrInvalidFormat        = fmt.Errorf("cose: invalid format")
)

Errors

Functions

func ParseCOSE

func ParseCOSE(buf []byte) (interface{}, error)

ParseCOSE parses a raw COSE key into a public key, either *ecdsa.PublicKey or *rsa.PublicKey.

func ParseCOSEMap

func ParseCOSEMap(m map[int]interface{}) (interface{}, error)

ParseCOSEMap parses a COSE key that has been decoded from it's CBOR format to a dictionary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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