Versions in this module Expand all Collapse all v1 v1.0.0 Aug 19, 2023 Changes in this version + func AccessAuth(c *gin.Context) (string, error) + func AccessAuth_Detached(key_id string) (string, error) + func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error) + func BytesToPublicKey(pub []byte) (*rsa.PublicKey, error) + func CheckIfSliceContains(slice []T, ele T) bool + func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error) + func DecryptWithSymmetricKey(key []byte, file_byte []byte) ([]byte, error) + func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error) + func EncryptWithSymmetricKey(key []byte, file_byte []byte) ([]byte, error) + func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error) + func GetContextClusterPublicKeyBytes(context_nm string) ([]byte, error) + func GetContextUserCertificateBytes(context_nm string) ([]byte, error) + func GetContextUserCertificateBytes_Detached(config_b []byte, context_nm string) ([]byte, error) + func GetContextUserPrivateKeyBytes(context_nm string) ([]byte, error) + func GetContextUserPublicKeyBytes(context_nm string) ([]byte, error) + func GetContextUserPublicKeyBytes_Detached(config_b []byte, context_nm string) ([]byte, error) + func GetKubeConfigPath() (string, error) + func GetRandIntInRange(min int, max int) int + func PrivateKeyToBytes(priv *rsa.PrivateKey) ([]byte, error) + func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error) + func RandomHex(n int) (string, error) + type ChallengRecord map[string]map[string]string + func GenerateChallenge(client_ca_pub_key ChallengRecord) (ChallengRecord, error) + func GenerateChallenge_Detached(config_b []byte, client_ca_pub_key ChallengRecord) (ChallengRecord, error) + type KeyRecord map[string]string + func VerifyChallange(answer ChallengRecord) (string, KeyRecord, error) + func VerifyChallange_Detached(config_b []byte, answer ChallengRecord) (string, KeyRecord, error)