Documentation
¶
Index ¶
- Constants
- func Base64toKey(s string) (*rsa.PublicKey, error)
- func GenerateKey() (*rsa.PrivateKey, error)
- func KeyToBase64(key *rsa.PublicKey) string
- func MarshalPrivateKey(key *rsa.PrivateKey) ([]byte, error)
- func MarshalPublicKey(key *rsa.PublicKey) ([]byte, error)
- func UnmarshalPrivateKey(bs []byte) (*rsa.PrivateKey, error)
- func UnmarshalPublicKey(bs []byte) (*rsa.PublicKey, error)
- type KeyInfo
- type RSAKeeper
- func (keeper *RSAKeeper) AddKey(keyUUID uuid.UUID, key *rsa.PublicKey) error
- func (keeper *RSAKeeper) ChangeKey(keyUUID uuid.UUID, key *rsa.PublicKey) error
- func (keeper *RSAKeeper) DeleteKey(keyUUID uuid.UUID) error
- func (keeper *RSAKeeper) GetKey(keyUUID uuid.UUID) (*rsa.PublicKey, error)
- func (keeper *RSAKeeper) ListKeys() ([]KeyInfo, error)
- func (keeper *RSAKeeper) Running() bool
- func (keeper *RSAKeeper) Shutdown() error
Constants ¶
View Source
const KeySize = 2048
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey() (*rsa.PrivateKey, error)
GenerateKey generates RSA key pair with the defined key size.
func KeyToBase64 ¶
func MarshalPrivateKey ¶
func MarshalPrivateKey(key *rsa.PrivateKey) ([]byte, error)
func UnmarshalPrivateKey ¶
func UnmarshalPrivateKey(bs []byte) (*rsa.PrivateKey, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.