Documentation ¶
Index ¶
- func CertVerify(hash crypto.Hash, hashed, cert, signature []byte) error
- func Decrypt(ciphertext, privateKey []byte) ([]byte, error)
- func Encrypt(origData, publicKey []byte) ([]byte, error)
- func GenKey(bits int) error
- func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
- func Sign(hash basecrypto.Hash, hashed, privateKey []byte) ([]byte, error)
- func Verify(hash basecrypto.Hash, hashed, publicKey, signature []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertVerify ¶
CertVerify rsa verify hashed := md5.Sum(src) hashed := sha256.Sum256(src) signature is a valid signature of message from the public key.
func MarshalPKCS8PrivateKey ¶
func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte
MarshalPKCS8PrivateKey MarshalPKCS8PrivateKey
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.