Documentation ¶
Overview ¶
Package smime implants parts of the S/MIME 4.0 specification rfc5751-bis-12.
See https://www.ietf.org/id/draft-ietf-lamps-rfc5751-bis-12.txt
Index ¶
- type Header
- type SMIME
- func (smime *SMIME) AuthEncrypt(msg []byte, recipients []*x509.Certificate, opts ...Header) (smimemsg []byte, err error)
- func (smime *SMIME) Decrypt(msg []byte) (plaintext []byte, err error)
- func (smime *SMIME) Encrypt(msg []byte, recipients []*x509.Certificate, opts ...Header) (smimemsg []byte, err error)
- func (smime *SMIME) Sign(msg []byte) (signedMsg []byte, err error)
- func (smime *SMIME) Verify(msg []byte) (chains [][][]*x509.Certificate, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SMIME ¶
SMIME is an instance of cms to en-/decrypt and sign/verfiy SMIME messages with the given keyPairs and options.
func New ¶
func New(keyPair ...tls.Certificate) (smime *SMIME, err error)
New create a new instance of SMIME with given keyPairs.
func (*SMIME) AuthEncrypt ¶
func (smime *SMIME) AuthEncrypt(msg []byte, recipients []*x509.Certificate, opts ...Header) (smimemsg []byte, err error)
AuthEncrypt authenticated-encrypts msg for the recipients and returns SMIME message.
func (*SMIME) Encrypt ¶
func (smime *SMIME) Encrypt(msg []byte, recipients []*x509.Certificate, opts ...Header) (smimemsg []byte, err error)
Encrypt encrypts msg for the recipients and returns SMIME message.
Click to show internal directories.
Click to hide internal directories.