Versions in this module Expand all Collapse all v1 v1.0.1 Jan 7, 2021 Changes in this version + var ErrVerificationFailed = errors.New("signature verification failed") + func Decrypt(privateKey []byte, doc []byte) ([]byte, error) + func Encrypt(publicKey, doc []byte, opts EncryptOptions) ([]byte, error) + func Sign(key []byte, doc []byte, opts SignatureOptions) ([]byte, error) + func Verify(publicKey []byte, doc []byte, opts SignatureOptions) error + type CipherType int + const DefaultCipher + const RsaOaep + const RsaPkcs1 + type DigestAlgorithmType int + const DefaultDigestAlgorithm + const Sha1 + const Sha256 + const Sha384 + const Sha512 + type EncryptOptions struct + Cipher CipherType + DigestAlgorithm DigestAlgorithmType + SessionCipher SessionCipherType + type Method struct + Algorithm string + type Reference struct + DigestMethod Method + DigestValue string + ReferenceTransforms []Method + URI string + type SessionCipherType int + const Aes128Cbc + const Aes192Cbc + const Aes256Cbc + const DefaultSessionCipher + const Des3Cbc + type Signature struct + KeyName string + SignatureValue string + SignedInfo SignedInfo + X509Certificate *SignatureX509Data + XMLName xml.Name + func DefaultSignature(pemEncodedPublicKey []byte) Signature + type SignatureOptions struct + XMLID []XMLIDOption + type SignatureX509Data struct + X509Certificate string + type SignedInfo struct + CanonicalizationMethod Method + Reference Reference + SignatureMethod Method + type XMLIDOption struct + AttributeName string + ElementName string + ElementNamespace string