Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IProtocol ¶
type IProtocol interface { GetKey() []byte GetIV() []byte GetMessage() []byte GetVersion() []byte GetVersionString() string ToByteArray() []byte ToBase64() string IsVersionValid() bool }
IProtocol represents a protocol interface.
func CreateProtocol ¶
CreateProtocol creates a new protocol instance with the given key, iv, and message. If the key is not provided, a random key will be generated. If the iv is not provided, a random iv will be generated. An error is returned if the key or iv length is invalid.
func ImportProtocol ¶
ImportProtocol is a function that imports a protocol from the given data.
func ImportProtocolBase64 ¶
ImportProtocolBase64 decodes a base64-encoded string and imports the protocol. It returns the imported protocol and any error encountered during decoding or importing.
Click to show internal directories.
Click to hide internal directories.