Documentation ¶
Index ¶
- func JWKFromKey(opaqueKey interface{}) (*jwk.JWK, error)
- func JWKFromX25519Key(pubKey []byte) (*jwk.JWK, error)
- func PubKeyBytesToJWK(bytes []byte, keyType kms.KeyType) (*jwk.JWK, error)
- func PubKeyBytesToKey(bytes []byte, keyType kms.KeyType) (interface{}, error)
- func PublicKeyFromJWK(jwkKey *jwk.JWK) (*cryptoapi.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JWKFromKey ¶
JWKFromKey creates a JWK from an opaque key struct. It's e.g. *ecdsa.PublicKey, *ecdsa.PrivateKey, ed25519.VerificationMethod, *bbs12381g2pub.PrivateKey or *bbs12381g2pub.PublicKey.
func JWKFromX25519Key ¶
JWKFromX25519Key is similar to JWKFromKey but is specific to X25519 keys when using a public key as raw []byte. This builder function presets the curve and key type in the JWK. Using JWKFromKey for X25519 raw keys will not have these fields set and will not provide the right JWK output.
func PubKeyBytesToJWK ¶
PubKeyBytesToJWK converts marshalled bytes of keyType into JWK.
func PubKeyBytesToKey ¶ added in v1.1.0
PubKeyBytesToKey creates an opaque key struct from the given public key bytes. It's e.g. *ecdsa.PublicKey, *ecdsa.PrivateKey, ed25519.VerificationMethod, *bbs12381g2pub.PrivateKey or *bbs12381g2pub.PublicKey.
Types ¶
This section is empty.