util

package
v3.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Discard = new(ioDiscard)

Functions

func EncAddr

func EncAddr(addr, key string) string

xor address with a one time pad if the address isn't long enough it's padded with spaces

func GenLoginCredSalt

func GenLoginCredSalt() (salt string)

generate a login salt for nntp users

func GetFilenameForBoardPage

func GetFilenameForBoardPage(webroot_dir, boardname string, pageno int, json bool) string

func GetFilenameForBoards

func GetFilenameForBoards(webroot_dir string) string

func GetFilenameForCatalog

func GetFilenameForCatalog(webroot_dir, boardname string) string

func GetFilenameForHistory

func GetFilenameForHistory(webroot_dir string) string

func GetFilenameForIndex

func GetFilenameForIndex(webroot_dir string) string

func GetFilenameForThread

func GetFilenameForThread(webroot_dir, root_post_id string, json bool) string

func GetFilenameForUkko

func GetFilenameForUkko(webroot_dir string) string

func GetGroupAndPageHTML

func GetGroupAndPageHTML(file string) (board string, page int)

func GetGroupForCatalogHTML

func GetGroupForCatalogHTML(file string) (group string)

func GetThreadHashHTML

func GetThreadHashHTML(file string) (thread string)

func HashMessageID

func HashMessageID(msgid string) string

message id hash

func IPNet2MinMax

func IPNet2MinMax(inet *net.IPNet) (min, max net.IP)

func IsSage

func IsSage(str string) bool

func IsSubnet

func IsSubnet(cidr string) (bool, *net.IPNet)

func NewAddrEnc

func NewAddrEnc(addr string) (string, string)

given an address generate a new encryption key for it return the encryption key and the encrypted address

func NntpLoginCredHash

func NntpLoginCredHash(passwd, salt string) (str string)

do nntp login credential hash given password and salt

func TimeNow

func TimeNow() int64

time for right now as int64

func ZeroIPString

func ZeroIPString(ip net.IP) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL