Documentation ¶
Overview ¶
clientapi package implements the grpc communication between rac and ras.
Index ¶
- func DecryptKeyOpIncome(encCmdData, privKey []byte) (*inKeyInfo, error)
- func EncryptKeyOpOutcome(retMessage retKeyInfo, sessionKey, KtaPublickeyCert []byte) ([]byte, error)
- func GetdbConfig(strDbConfig string) string
- func RsaDecrypt(ciphertext, keyBytes []byte) ([]byte, error)
- func RsaEncrypt(data, keyBytes []byte) ([]byte, error)
- func StartServer(addr string)
- func StopServer()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptKeyOpIncome ¶
DecryptKeyOpIncome firstly decrypt encrypted session key with kcm privatekey, and then uses session key to decrypt encrypted data, retrurns decrypted data.
func EncryptKeyOpOutcome ¶
func EncryptKeyOpOutcome(retMessage retKeyInfo, sessionKey, KtaPublickeyCert []byte) ([]byte, error)
EncryptKeyOpOutcome firstly encrypt data with sesionkey, and then uses kta public key to encrypt sessionkey with kta public key, retrurns encrypted data and encrypted sessionkey.
func GetdbConfig ¶
GetdbConfig returns db config information.
func RsaDecrypt ¶
RsaDecrypt is based on rsa algorithm using the key to decrypt ciphertext.
func RsaEncrypt ¶
RsaEncrypt is based on rsa algorithm using the key to encrypt data.
func StartServer ¶
func StartServer(addr string)
StartServer starts a server to provide ras rpc services.
func StopServer ¶
func StopServer()
StopServer stops the server and trust manager, release all resources.
Types ¶
This section is empty.