Documentation
¶
Index ¶
- Constants
- func ComputeChecksum(key []byte, salt int32, data ...any) ([]byte, error)
- func ComputeMICChecksum(key []byte, data ...any) ([]byte, error)
- func ComputeWrapChecksum(key []byte, data ...any) ([]byte, error)
- func DeriveEncryptionKey(key []byte, seqNum []byte) ([]byte, error)
- func DeriveSigningKey(key []byte) ([]byte, error)
- func NewCipher(key []byte, seqNum []byte) (*rc4.Cipher, error)
- func XORSequenceNumber(key []byte, cksum []byte, seqNum []byte) error
- type MICToken
- type WrapToken
- func (tok *WrapToken) Equals(other *WrapToken) bool
- func (tok *WrapToken) Header() []byte
- func (tok *WrapToken) Marshal() []byte
- func (tok *WrapToken) SetEncryption(encrypt bool) *WrapToken
- func (tok *WrapToken) SetSequenceNumber(seqNum uint32, isLocal bool) *WrapToken
- func (tok *WrapToken) Size() int
- func (tok *WrapToken) Unmarshal(b []byte) error
- func (tok *WrapToken) UseEncryption() bool
Constants ¶
View Source
const ( KeySaltWrap = int32(13) KeySaltMIC = int32(15) )
View Source
const ( // HMAC signature algorithm. SignAlgorithmHMAC = 0x1100 // RC4 seal algorithm. SealAlgorithmRC4 = 0x1000 )
Variables ¶
This section is empty.
Functions ¶
func DeriveSigningKey ¶
Types ¶
type MICToken ¶
MICToken is a token used for MIC.
func (*MICToken) SetSequenceNumber ¶
SetSequenceNumber sets the sequence number of the token.
type WrapToken ¶
WrapToken is a token used for wrapping.
func (*WrapToken) SetEncryption ¶
func (*WrapToken) SetSequenceNumber ¶
SetSequenceNumber sets the sequence number of the token.
func (*WrapToken) UseEncryption ¶
Click to show internal directories.
Click to hide internal directories.