Documentation ¶
Index ¶
- Constants
- func ExtractBase64FromPEM(pemData string) (string, error)
- type Asymmetric
- type Digest
- type Fpe
- type Hash
- type KadpClient
- func (client *KadpClient) AsymmetricKeyPair(design Asymmetric) (publicKey string, privateKey string, err error)
- func (client *KadpClient) AsymmetricPriDecrypt(ciphertext string, design Asymmetric, privateKey string) (string, error)
- func (client *KadpClient) AsymmetricPubEncrypt(plaintext string, design Asymmetric, publicKey string) (string, error)
- func (client *KadpClient) Decipher(ciphertext string, design Symmetry, modeVal Mode, paddingVal Padding, ...) (string, error)
- func (client *KadpClient) DigestEncrypt(plaintext string) string
- func (client *KadpClient) Encipher(plaintext []byte, design Symmetry, modeVal Mode, paddingVal Padding, ...) (string, error)
- func (client *KadpClient) FpeDecipher(ciphertext string, fpe Fpe, tweak, alphabet string, length int, label string, ...) (string, error)
- func (client *KadpClient) FpeEncipher(plaintext string, fpe Fpe, tweak, alphabet string, length int, label string, ...) (string, error)
- func (client *KadpClient) Hmac(message []byte, label string, length int) (string, error)
- func (client *KadpClient) HmacVerify(message []byte, hmacVal, label string, length int) (bool, error)
- func (client *KadpClient) RsaSignature(plaintext, privateKey string) (string, error)
- func (client *KadpClient) RsaVerify(plaintext, SignatureText, publicKey string) (bool, error)
- func (client *KadpClient) SHASum(message []byte, shaHash Hash) (string, error)
- func (client *KadpClient) SM2Signature(plaintext, privateKey string, uid []byte) (r, s string, err error)
- func (client *KadpClient) SM2Verify(plaintext, publicKey, r, s string, uid []byte) (bool, error)
- type Mode
- type Padding
- type Symmetry
Constants ¶
View Source
const ( FF1 Fpe = "FF1" FF3 Fpe = "FF1_3" AES Symmetry = "AES" SM4 Symmetry = "SM4" DES Symmetry = "DES" SM2 Asymmetric = "SM2" RSA Asymmetric = "RSA" SM3 Digest = "SM3" Sha1 Hash = "SHA-1" Sha256 Hash = "SHA-256" )
Variables ¶
This section is empty.
Functions ¶
func ExtractBase64FromPEM ¶
Types ¶
type Asymmetric ¶
type Asymmetric string
type KadpClient ¶
type KadpClient struct {
// contains filtered or unexported fields
}
func NewKADPClient ¶
func NewKADPClient(domain, credential, keyStoreFileName, keyStorePassWord string) (*KadpClient, error)
NewKADPClient 初始化KADP
func (*KadpClient) AsymmetricKeyPair ¶
func (client *KadpClient) AsymmetricKeyPair(design Asymmetric) (publicKey string, privateKey string, err error)
func (*KadpClient) AsymmetricPriDecrypt ¶
func (client *KadpClient) AsymmetricPriDecrypt(ciphertext string, design Asymmetric, privateKey string) (string, error)
func (*KadpClient) AsymmetricPubEncrypt ¶
func (client *KadpClient) AsymmetricPubEncrypt(plaintext string, design Asymmetric, publicKey string) (string, error)
func (*KadpClient) DigestEncrypt ¶
func (client *KadpClient) DigestEncrypt(plaintext string) string
func (*KadpClient) FpeDecipher ¶
func (*KadpClient) FpeEncipher ¶
func (*KadpClient) HmacVerify ¶
func (*KadpClient) RsaSignature ¶
func (client *KadpClient) RsaSignature(plaintext, privateKey string) (string, error)
func (*KadpClient) RsaVerify ¶
func (client *KadpClient) RsaVerify(plaintext, SignatureText, publicKey string) (bool, error)
func (*KadpClient) SHASum ¶
func (client *KadpClient) SHASum(message []byte, shaHash Hash) (string, error)
func (*KadpClient) SM2Signature ¶
func (client *KadpClient) SM2Signature(plaintext, privateKey string, uid []byte) (r, s string, err error)
Click to show internal directories.
Click to hide internal directories.