Documentation ¶
Index ¶
- Constants
- func Decrypt(data []byte, method string, key ...[]byte) ([]byte, error)
- func Encrypt(data []byte, method string, key ...[]byte) ([]byte, error)
- func PKCS1PrivateKey(key []byte) (*rsa.PrivateKey, error)
- func PKCS1PublicKey(key []byte) (*rsa.PublicKey, error)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func PKCS8PrivateKey(key []byte) (*rsa.PrivateKey, error)
- func RSADecrypt(ciphertext, privateKey []byte) ([]byte, error)
- func RSAEncrypt(origData, publicKey []byte) ([]byte, error)
- func Sign()
- type AESCipher
- type Base64Cipher
- type Cipher
- type Signature
Constants ¶
View Source
const ( SignType_SHA256WithRSA = "SHA256WithRSA" SignType_MD5 = "MD5" )
Variables ¶
This section is empty.
Functions ¶
func PKCS1PrivateKey ¶
func PKCS1PrivateKey(key []byte) (*rsa.PrivateKey, error)
func PKCS7UnPadding ¶
func PKCS8PrivateKey ¶
func PKCS8PrivateKey(key []byte) (*rsa.PrivateKey, error)
Types ¶
type Base64Cipher ¶
type Base64Cipher struct { }
Click to show internal directories.
Click to hide internal directories.