Documentation
¶
Index ¶
- func RotateKeys(km *KeyManager, interval time.Duration) error
- type KeyManager
- func (km *KeyManager) DecryptAESKey(privKey *rsa.PrivateKey, encryptedKey []byte) ([]byte, error)
- func (km *KeyManager) DecryptData(encrypted, aesKey []byte) ([]byte, error)
- func (km *KeyManager) EncryptAESKey(pubKey *rsa.PublicKey, aesKey []byte) ([]byte, error)
- func (km *KeyManager) EncryptData(data, aesKey []byte) ([]byte, error)
- func (km *KeyManager) GetPrivateKey() *rsa.PrivateKey
- func (km *KeyManager) GetPublicKey() *rsa.PublicKey
- func (km *KeyManager) SetKeys(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RotateKeys ¶
func RotateKeys(km *KeyManager, interval time.Duration) error
Types ¶
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
func NewKeyManager ¶
func NewKeyManager() *KeyManager
func (*KeyManager) DecryptAESKey ¶
func (km *KeyManager) DecryptAESKey(privKey *rsa.PrivateKey, encryptedKey []byte) ([]byte, error)
func (*KeyManager) DecryptData ¶
func (km *KeyManager) DecryptData(encrypted, aesKey []byte) ([]byte, error)
func (*KeyManager) EncryptAESKey ¶
func (*KeyManager) EncryptData ¶
func (km *KeyManager) EncryptData(data, aesKey []byte) ([]byte, error)
func (*KeyManager) GetPrivateKey ¶
func (km *KeyManager) GetPrivateKey() *rsa.PrivateKey
func (*KeyManager) GetPublicKey ¶
func (km *KeyManager) GetPublicKey() *rsa.PublicKey
func (*KeyManager) SetKeys ¶
func (km *KeyManager) SetKeys(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey)
Click to show internal directories.
Click to hide internal directories.