Documentation
¶
Index ¶
- func Base64(data []byte) string
- func Base64Decode(s string) ([]byte, error)
- func Base64Raw(data []byte) string
- func Base64URL(data []byte) string
- func Hex(data []byte) string
- func HexDecode(s string) ([]byte, error)
- func JSON(v any) string
- func ROT13(s string) string
- func URL(s string) string
- func URLDecode(s string) (string, error)
- func URLPath(s string) string
- func URLRaw(s string) string
- func UTF16LE(s string) []byte
- func XOR(data, key []byte) []byte
- type Buffer
- func (b *Buffer) Build() []byte
- func (b *Buffer) Byte(v int) *Buffer
- func (b *Buffer) Bytes(v []byte) *Buffer
- func (b *Buffer) Len() int
- func (b *Buffer) NameList(names ...string) *Buffer
- func (b *Buffer) String(s string) *Buffer
- func (b *Buffer) Uint16(v int) *Buffer
- func (b *Buffer) Uint16LE(v int) *Buffer
- func (b *Buffer) Uint32(v int) *Buffer
- func (b *Buffer) Uint32LE(v int) *Buffer
- func (b *Buffer) Uint64(v int) *Buffer
- func (b *Buffer) Zeroes(n int) *Buffer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
Base64Decode decodes a standard base64 string.
func URLRaw ¶
URLRaw percent-encodes a string preserving RFC 3986 unreserved characters. Unlike url.QueryEscape, it encodes spaces as %20 (not +) and only escapes characters that are not in: A-Z a-z 0-9 - _ . ~
Types ¶
type Buffer ¶ added in v0.4.0
type Buffer struct {
// contains filtered or unexported fields
}
Buffer is a fluent binary packet builder with big-endian encoding. Designed for crafting protocol messages.
func (*Buffer) NameList ¶ added in v0.4.0
NameList appends a comma-joined name list with 4-byte length prefix.
func (*Buffer) String ¶ added in v0.4.0
String appends a length-prefixed string: 4-byte big-endian length + data.
Click to show internal directories.
Click to hide internal directories.