package keys

import "github.com/theupdateframework/notary/tuf/testutils/keys"

Index

Functions

func CreateOrAddKey

func CreateOrAddKey(cs signed.CryptoService, role data.RoleName, gun data.GUN, keyAlgorithm string) (pubKey data.PublicKey, err error)

CreateOrAddKey creates a new key in case of ECDSA or ED25519 inside the cryptoservice with the given role and gun while in the case of RSA, it takes a key from the map that includes multiple pre-existing RSA keys and adds them to the keystore, returning the public key.

func GetRSAKey

func GetRSAKey(size int) (data.PrivateKey, error)

GetRSAKey returns a parsed RSA key based on the given size

Source Files

keys.go

Version
v0.7.0 (latest)
Published
Jan 14, 2021
Platform
js/wasm
Imports
6 packages
Last checked
19 hours ago

Tools for package owners.