Documentation ¶
Index ¶
- func ExtractBase64FromPEM(pemData string) (string, error)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- type KadpClient
- func (client *KadpClient) AsymmetricKeyPair(design algorithm.Asymmetric) (publicKey string, privateKey string, err error)
- func (client *KadpClient) AsymmetricPriDecrypt(ciphertext string, design algorithm.Asymmetric, privateKey string) (string, error)
- func (client *KadpClient) AsymmetricPubEncrypt(plaintext string, design algorithm.Asymmetric, publicKey string) (string, error)
- func (client *KadpClient) Decipher(ciphertext string, design algorithm.Symmetry, modeVal mode.Mode, ...) (string, error)
- func (client *KadpClient) DigestEncrypt(plaintext string) string
- func (client *KadpClient) Encipher(plaintext []byte, design algorithm.Symmetry, modeVal mode.Mode, ...) (string, error)
- func (client *KadpClient) FpeDecipher(ciphertext string, fpe algorithm.Fpe, tweak string, radix, length int, ...) (string, error)
- func (client *KadpClient) FpeEncipher(plaintext string, fpe algorithm.Fpe, tweak string, radix, length int, ...) (string, error)
- func (client *KadpClient) RsaSignature(plaintext, privateKey string) (string, error)
- func (client *KadpClient) RsaVerify(plaintext, SignatureText, publicKey string) (bool, 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBase64FromPEM ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
type KadpClient ¶
type KadpClient struct {
// contains filtered or unexported fields
}
func NewKADPClient ¶
func NewKADPClient(domain, credential string) (*KadpClient, error)
func (*KadpClient) AsymmetricKeyPair ¶
func (client *KadpClient) AsymmetricKeyPair(design algorithm.Asymmetric) (publicKey string, privateKey string, err error)
func (*KadpClient) AsymmetricPriDecrypt ¶ added in v1.0.2
func (client *KadpClient) AsymmetricPriDecrypt(ciphertext string, design algorithm.Asymmetric, privateKey string) (string, error)
func (*KadpClient) AsymmetricPubEncrypt ¶ added in v1.0.2
func (client *KadpClient) AsymmetricPubEncrypt(plaintext string, design algorithm.Asymmetric, publicKey string) (string, error)
func (*KadpClient) DigestEncrypt ¶ added in v1.0.2
func (client *KadpClient) DigestEncrypt(plaintext string) string
func (*KadpClient) FpeDecipher ¶
func (*KadpClient) FpeEncipher ¶
func (*KadpClient) RsaSignature ¶ added in v1.0.2
func (client *KadpClient) RsaSignature(plaintext, privateKey string) (string, error)
func (*KadpClient) RsaVerify ¶ added in v1.0.2
func (client *KadpClient) RsaVerify(plaintext, SignatureText, publicKey string) (bool, error)
func (*KadpClient) SM2Signature ¶ added in v1.0.2
func (client *KadpClient) SM2Signature(plaintext, privateKey string, uid []byte) (r, s string, err error)
Click to show internal directories.
Click to hide internal directories.