Documentation
¶
Overview ¶
Package xmlenc implements xml encrytion natively (https://www.w3.org/TR/2002/REC-xmlenc-core-20021210/Overview.html)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotFindEncryptedDataNode = errors.New("cannot find EncryptedData node")
View Source
var ErrPublicKeyMismatch = errors.New("certificate public key does not match provided private key")
Functions ¶
Types ¶
type CipherData ¶
type CipherData struct {
XMLName xml.Name `xml:"http://www.w3.org/2001/04/xmlenc# CipherData"`
CipherValue *CipherValue
}
type CipherValue ¶
type DigestMethod ¶
type EncryptedData ¶
type EncryptedData struct {
XMLName xml.Name `xml:"http://www.w3.org/2001/04/xmlenc# EncryptedData"`
ID *string `xml:"Id,attr"`
Type *string `xml:",attr"`
EncryptionMethod *EncryptionMethod `xml:"http://www.w3.org/2001/04/xmlenc# EncryptionMethod"`
KeyInfo *KeyInfo `xml:"http://www.w3.org/2000/09/xmldsig# KeyInfo"`
CipherData *CipherData `xml:"http://www.w3.org/2001/04/xmlenc# CipherData"`
}
type EncryptedKey ¶
type EncryptedKey struct {
XMLName xml.Name `xml:"http://www.w3.org/2001/04/xmlenc# EncryptedKey"`
EncryptionMethod *EncryptionMethod `xml:"http://www.w3.org/2001/04/xmlenc# EncryptionMethod"`
KeyInfo *KeyInfo `xml:"http://www.w3.org/2000/09/xmldsig# KeyInfo"`
CipherData *CipherData `xml:"http://www.w3.org/2001/04/xmlenc# CipherData"`
}
type EncryptionMethod ¶
type EncryptionMethod struct {
XMLName xml.Name `xml:"http://www.w3.org/2001/04/xmlenc# EncryptionMethod"`
Algorithm *string `xml:",attr"`
OAEPparams *OAEPparams `xml:"http://www.w3.org/2001/04/xmlenc# OAEPparams"`
DigestMethod *DigestMethod `xml:"http://www.w3.org/2000/09/xmldsig# DigestMethod"`
}
type ErrUnsupportedAlgorithm ¶
type ErrUnsupportedAlgorithm struct {
Algorithm string
}
func (ErrUnsupportedAlgorithm) Error ¶
func (e ErrUnsupportedAlgorithm) Error() string
type KeyInfo ¶
type KeyInfo struct {
XMLName xml.Name `xml:"http://www.w3.org/2000/09/xmldsig# KeyInfo"`
EncryptedKey *EncryptedKey `xml:"http://www.w3.org/2001/04/xmlenc# EncryptedKey"`
X509Data *X509Data `xml:"http://www.w3.org/2000/09/xmldsig# X509Data"`
}
type OAEPparams ¶
type X509Certificate ¶
type X509Data ¶
type X509Data struct {
XMLName xml.Name `xml:"http://www.w3.org/2000/09/xmldsig# X509Data"`
X509Certificate *X509Certificate
}
Click to show internal directories.
Click to hide internal directories.