crypto

package
v0.0.0-...-3b98bfd Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHA_256 = 0
	SHA_1   = 1
	MD5     = 2
)

Variables

View Source
var (
	BaseOrdering     = SortingMode{Base: -310256979, Offset: 13}
	ExtendedOrdering = SortingMode{Base: -1964139357, Offset: 7}
)

Functions

func DecodeBase64

func DecodeBase64(encoding *base64.Encoding, data string) []byte

func EncodeBase64

func EncodeBase64(data []byte) string

func GenerateUUID

func GenerateUUID() string

func GetServerTime

func GetServerTime() int64

Returns a timestamp synchronized with Kik's server. Should be used for all outgoing stanzas in the cts and kik.timestamp attributes

func GetServerTimeAsString

func GetServerTimeAsString() string

func MakeCryptoTimestamp

func MakeCryptoTimestamp() int64

This should only be used for the stream header (<k/>)

func MakeKTag

func MakeKTag(attrs map[string]string) string

Makes a 'k' tag, including correct spaces and order.

func SetServerTimeOffset

func SetServerTimeOffset(offset int64)

Types

type SortingMode

type SortingMode struct {
	Base   int32
	Offset int32
}

Jump to

Keyboard shortcuts

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