Documentation
¶
Overview ¶
Package session_key implements the I2P SessionKey common data structure
Package session_key implements the I2P SessionKey common data structure
Index ¶
Constants ¶
const SESSION_KEY_SIZE = 32
SESSION_KEY_SIZE defines the size of an I2P SessionKey in bytes. As specified in the I2P common structures specification.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionKey ¶
type SessionKey [SESSION_KEY_SIZE]byte
SessionKey is the represenation of an I2P SessionKey.
https://geti2p.net/spec/common-structures#sessionkey
func NewSessionKey ¶
func NewSessionKey(data []byte) (session_key *SessionKey, remainder []byte, err error)
NewSessionKey creates a new *SessionKey from []byte using ReadSessionKey. Returns a pointer to SessionKey unlike ReadSessionKey.
func ReadSessionKey ¶
func ReadSessionKey(bytes []byte) (info SessionKey, remainder []byte, err error)
ReadSessionKey returns SessionKey from a []byte. The remaining bytes after the specified length are also returned. Returns a list of errors that occurred during parsing.