privatebin

package
v0.45.5 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64

func Base64(src []byte) string

Base64 encodes a byte slice to a base64 string.

func GenRandomBytes

func GenRandomBytes(n uint32) ([]byte, error)

GenRandomBytes generates crypto-secure random bytes.

func Post

func Post(input []byte, host string) (string, error)

func StripANSI

func StripANSI(str string) string

StripANSI strips ansi out of a string.

Types

type PasteContent

type PasteContent struct {
	Paste string `json:"paste"`
}

PasteContent .

type PasteData

type PasteData struct {
	*PasteSpec
	Data []byte
}

PasteData .

type PasteRequest

type PasteRequest struct {
	V     int              `json:"v"`
	AData []interface{}    `json:"adata"`
	Meta  PasteRequestMeta `json:"meta"`
	CT    string           `json:"ct"`
}

PasteRequest .

type PasteRequestMeta

type PasteRequestMeta struct {
	Expire string `json:"expire"`
}

PasteRequestMeta .

type PasteResponse

type PasteResponse struct {
	Status      int    `json:"status"`
	ID          string `json:"id"`
	URL         string `json:"url"`
	DeleteToken string `json:"deletetoken"`
}

PasteResponse .

type PasteSpec

type PasteSpec struct {
	IV          string
	Salt        string
	Iterations  int
	KeySize     int
	TagSize     int
	Algorithm   string
	Mode        string
	Compression string
}

PasteSpec .

func (*PasteSpec) SpecArray

func (spec *PasteSpec) SpecArray() []interface{}

SpecArray .

Jump to

Keyboard shortcuts

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