Documentation ¶
Index ¶
- func DecryptPGPString(data string, prKey string) (string, error)
- func EncryptPGPString(data string, pbKey string) (string, error)
- func GeneratePGPKeyPair() (string, string, error)
- func GetTLSConfig(caCertFile string, certFile string, keyFile string) (*tls.Config, error)
- func ReadFromFile(fileName string) (string, error)
- func WriteToFile(data string, fileName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptPGPString ¶
DecryptPGPString decrypts a PGP encoded input string and returns a base64 representation of the decoded string
func EncryptPGPString ¶
EncryptPGPString takes data and a public key and encrypts using that public key
func GeneratePGPKeyPair ¶
GeneratePGPKeyPair produces a PGP key pair and returns two things: A base64 encoded form of the public part of the entity A base64 encoded form of the private key
func GetTLSConfig ¶
GetTLSConfig initializes a tlsConfig using the CA's certificate This config is then used to enable the server for mutual TLS
func ReadFromFile ¶
ReadFromFile reads a file and loads the PGP key into a string
func WriteToFile ¶
WriteToFile writes a PGP key into a file. It will truncate the file if it exists
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.