Documentation
¶
Index ¶
- func EncodeRSAPrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
- func EncodeRSAPublicKeyToPEM(publicKey *rsa.PublicKey) ([]byte, error)
- func ExportRSAPublicKeyToPEM(publicKey *rsa.PublicKey) ([]byte, error)
- func GenerateGPGKey(keyPath string) error
- func GenerateRSAKeyPair(vaultRoot string, cfg *config.VaultConfig) error
- func GenerateTestRSAKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func GetPublicKeyFingerprint(publicKey *rsa.PublicKey) (string, error)
- func GetRSAPublicKeyFingerprint(publicKey *rsa.PublicKey) (string, error)
- func LoadRSAKeys(vaultPath string, rsaConfig *config.RSAConfig) (*rsa.PrivateKey, *rsa.PublicKey, *config.RSAConfig, error)
- func ParseRSAPrivateKeyFromPEM(pemData []byte) (*rsa.PrivateKey, error)
- func ParseRSAPublicKeyFromPEM(pemData []byte) (*rsa.PublicKey, error)
- func ValidateRSAKeyPair(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeRSAPrivateKeyToPEM ¶
func EncodeRSAPrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte
EncodeRSAPrivateKeyToPEM encodes an RSA private key to PEM format
func EncodeRSAPublicKeyToPEM ¶
EncodeRSAPublicKeyToPEM encodes an RSA public key to PEM format
func ExportRSAPublicKeyToPEM ¶
Export RSA public key to PEM format
func GenerateGPGKey ¶
func GenerateRSAKeyPair ¶
func GenerateRSAKeyPair(vaultRoot string, cfg *config.VaultConfig) error
GenerateRSAKeyPair generates an RSA key pair and saves it to the specified directory
func GenerateTestRSAKeyPair ¶
GenerateTestRSAKeyPair generates a key pair for testing purposes
func GetPublicKeyFingerprint ¶
Get fingerprint for an RSA public key
func GetRSAPublicKeyFingerprint ¶
GetRSAPublicKeyFingerprint calculates the fingerprint for an RSA public key
func LoadRSAKeys ¶
func LoadRSAKeys(vaultPath string, rsaConfig *config.RSAConfig) (*rsa.PrivateKey, *rsa.PublicKey, *config.RSAConfig, error)
LoadRSAKeys loads RSA keys from the specified paths
func ParseRSAPrivateKeyFromPEM ¶
func ParseRSAPrivateKeyFromPEM(pemData []byte) (*rsa.PrivateKey, error)
ParseRSAPrivateKeyFromPEM parses an RSA private key from PEM format
func ParseRSAPublicKeyFromPEM ¶
ParseRSAPublicKeyFromPEM parses an RSA public key from PEM format
func ValidateRSAKeyPair ¶
func ValidateRSAKeyPair(privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey) error
ValidateRSAKeyPair validates that the private and public keys form a valid pair
Types ¶
This section is empty.