Documentation ¶
Overview ¶
Package rfc4757 provides encryption and checksum methods as specified in RFC 4757
Index ¶
- func Checksum(key []byte, usage uint32, data []byte) ([]byte, error)
- func DecryptData(key, data []byte, e etype.EType) ([]byte, error)
- func DecryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error)
- func EncryptData(key, data []byte, e etype.EType) ([]byte, error)
- func EncryptMessage(key, data []byte, usage uint32, export bool, e etype.EType) ([]byte, error)
- func HMAC(key []byte, data []byte) []byte
- func StringToKey(secret string) ([]byte, error)
- func UsageToMSMsgType(usage uint32) []byte
- func VerifyIntegrity(key, pt, data []byte, e etype.EType) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptData ¶
DecryptData decrypts the data provided using the methods specific to the etype provided as defined in RFC 4757.
func DecryptMessage ¶
DecryptMessage decrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. The integrity of the message is also verified.
func EncryptData ¶
EncryptData encrypts the data provided using methods specific to the etype provided as defined in RFC 4757.
func EncryptMessage ¶
EncryptMessage encrypts the message provided using the methods specific to the etype provided as defined in RFC 4757. The encrypted data is concatenated with its RC4 header containing integrity checksum and confounder to create an encrypted message.
func StringToKey ¶
StringToKey returns a key derived from the string provided according to the definition in RFC 4757.
func UsageToMSMsgType ¶
UsageToMSMsgType converts Kerberos key usage numbers to Microsoft message type encoded as a little-endian four byte slice.
Types ¶
This section is empty.