Documentation ¶
Index ¶
- 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[T comparable](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
- type KeyRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessAuth_Detached ¶
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
func CheckIfSliceContains ¶
func CheckIfSliceContains[T comparable](slice []T, ele T) bool
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
func DecryptWithSymmetricKey ¶
func EncryptWithPublicKey ¶
func EncryptWithSymmetricKey ¶
func GenerateKeyPair ¶
func GetKubeConfigPath ¶
func GetRandIntInRange ¶
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(priv *rsa.PrivateKey) ([]byte, error)
Types ¶
type ChallengRecord ¶
func GenerateChallenge ¶
func GenerateChallenge(client_ca_pub_key ChallengRecord) (ChallengRecord, error)
func GenerateChallenge_Detached ¶
func GenerateChallenge_Detached(config_b []byte, client_ca_pub_key ChallengRecord) (ChallengRecord, error)
type KeyRecord ¶
func VerifyChallange ¶
func VerifyChallange(answer ChallengRecord) (string, KeyRecord, error)
func VerifyChallange_Detached ¶
func VerifyChallange_Detached(config_b []byte, answer ChallengRecord) (string, KeyRecord, error)
Click to show internal directories.
Click to hide internal directories.