Documentation ¶
Index ¶
- Constants
- Variables
- func DecryptWithRsa(keyId string, encrypted []byte) ([]byte, error)
- func EncryptWithRsa(keyId, rawData string) ([]byte, error)
- func ErrToCode(err error) int
- func GetSecretParam(secretName string) (string, error)
- func Init()
- func RemoveRsaKey(keyId string) error
- type KeyInfo
- type KeyInfos
- type ParamInfo
Constants ¶
View Source
const ( ERR_OTHER_CODE = 1 // Error for 'agent not support' is 110 ERR_KEYID_NOTEXIST_CODE = 111 ERR_KEYID_DUPLICATED_CODE = 112 ERR_PARAM_NOTEXIST_CODE = 113 // length limit of plaintext to encrypt is 190byte, see https://crypto.stackexchange.com/questions/42097/what-is-the-maximum-size-of-the-plaintext-message-for-rsa-oaep LIMIT_PLAINTEXT_LEN = 190 )
Variables ¶
Functions ¶
func EncryptWithRsa ¶
func GetSecretParam ¶
func RemoveRsaKey ¶
Types ¶
type KeyInfo ¶
Click to show internal directories.
Click to hide internal directories.