Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Unsupported = fmt.Errorf("Algorithm not supported")
)
Functions ¶
func Encrypt ¶
func Encrypt(rand io.Reader, cert x509.Certificate, plaintext []byte, opts EncryptorOpts) ([]byte, error)
Encrypt the input plaintext to the x509 Certificate's Private Key
func Verify ¶
func Verify(rand io.Reader, cert x509.Certificate, input, signature []byte, opts VerifierOpts) error
Types ¶
type Encryptor ¶
type Encryptor interface { // Public returns the public key corresponding to the opaque, // private key. Public() crypto.PublicKey // Encrypt encrypts msg. The opts argument should be appropriate for // the primitive used. See the documentation in each implementation for // details. Encrypt(rand io.Reader, cleartext []byte, opts EncryptorOpts) (ciphertext []byte, err error) }
type EncryptorOpts ¶
type EncryptorOpts interface{}
type VerifierOpts ¶
Click to show internal directories.
Click to hide internal directories.