pencode

package
v0.0.0-...-0a077ff Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.3"

Variables

This section is empty.

Functions

This section is empty.

Types

type Base64Decoder

type Base64Decoder struct{}

func (Base64Decoder) Encode

func (b Base64Decoder) Encode(input []byte) ([]byte, error)

func (Base64Decoder) HelpText

func (b Base64Decoder) HelpText() string

func (Base64Decoder) Type

func (b Base64Decoder) Type() string

type Base64Encoder

type Base64Encoder struct{}

func (Base64Encoder) Encode

func (b Base64Encoder) Encode(input []byte) ([]byte, error)

func (Base64Encoder) HelpText

func (b Base64Encoder) HelpText() string

func (Base64Encoder) Type

func (b Base64Encoder) Type() string

type Chain

type Chain struct {
	Encoders []Encoder
	// contains filtered or unexported fields
}

func NewChain

func NewChain() *Chain

func (*Chain) Encode

func (c *Chain) Encode(input []byte) ([]byte, error)

func (*Chain) GetEncoders

func (c *Chain) GetEncoders() []string

func (*Chain) HasEncoder

func (c *Chain) HasEncoder(name string) (bool, error)

HasEncoder returns true if encoder with a specified name is configured

func (*Chain) Initialize

func (c *Chain) Initialize(actions []string) error

Initialize loops through requested names for encoders and sets up the encoder chain. If an unknown encoder is requested, error will be returned.

func (*Chain) Usage

func (c *Chain) Usage()

Usage prints the help string for each configured encoder

type Encoder

type Encoder interface {
	Encode([]byte) ([]byte, error)
	HelpText() string
	Type() string
}

func NewTemplateEncoder

func NewTemplateEncoder(name string) (Encoder, error)

type HexDecoder

type HexDecoder struct{}

func (HexDecoder) Encode

func (h HexDecoder) Encode(input []byte) ([]byte, error)

func (HexDecoder) HelpText

func (h HexDecoder) HelpText() string

func (HexDecoder) Type

func (h HexDecoder) Type() string

type HexEncoder

type HexEncoder struct{}

func (HexEncoder) Encode

func (h HexEncoder) Encode(input []byte) ([]byte, error)

func (HexEncoder) HelpText

func (h HexEncoder) HelpText() string

func (HexEncoder) Type

func (h HexEncoder) Type() string

type JSONEscaper

type JSONEscaper struct{}

func (JSONEscaper) Encode

func (u JSONEscaper) Encode(input []byte) ([]byte, error)

func (JSONEscaper) HelpText

func (u JSONEscaper) HelpText() string

func (JSONEscaper) Type

func (u JSONEscaper) Type() string

type JSONInput

type JSONInput struct {
	Input string `json:"input"`
}

type JSONUnescaper

type JSONUnescaper struct{}

func (JSONUnescaper) Encode

func (u JSONUnescaper) Encode(input []byte) ([]byte, error)

func (JSONUnescaper) HelpText

func (u JSONUnescaper) HelpText() string

func (JSONUnescaper) Type

func (u JSONUnescaper) Type() string

type MD5Hasher

type MD5Hasher struct{}

func (MD5Hasher) Encode

func (m MD5Hasher) Encode(input []byte) ([]byte, error)

func (MD5Hasher) HelpText

func (m MD5Hasher) HelpText() string

func (MD5Hasher) Type

func (m MD5Hasher) Type() string

type SHA1Hasher

type SHA1Hasher struct{}

func (SHA1Hasher) Encode

func (m SHA1Hasher) Encode(input []byte) ([]byte, error)

func (SHA1Hasher) HelpText

func (m SHA1Hasher) HelpText() string

func (SHA1Hasher) Type

func (m SHA1Hasher) Type() string

type SHA224Hasher

type SHA224Hasher struct{}

func (SHA224Hasher) Encode

func (m SHA224Hasher) Encode(input []byte) ([]byte, error)

func (SHA224Hasher) HelpText

func (m SHA224Hasher) HelpText() string

func (SHA224Hasher) Type

func (m SHA224Hasher) Type() string

type SHA256Hasher

type SHA256Hasher struct{}

func (SHA256Hasher) Encode

func (m SHA256Hasher) Encode(input []byte) ([]byte, error)

func (SHA256Hasher) HelpText

func (m SHA256Hasher) HelpText() string

func (SHA256Hasher) Type

func (m SHA256Hasher) Type() string

type SHA384Hasher

type SHA384Hasher struct{}

func (SHA384Hasher) Encode

func (m SHA384Hasher) Encode(input []byte) ([]byte, error)

func (SHA384Hasher) HelpText

func (m SHA384Hasher) HelpText() string

func (SHA384Hasher) Type

func (m SHA384Hasher) Type() string

type SHA512Hasher

type SHA512Hasher struct{}

func (SHA512Hasher) Encode

func (m SHA512Hasher) Encode(input []byte) ([]byte, error)

func (SHA512Hasher) HelpText

func (m SHA512Hasher) HelpText() string

func (SHA512Hasher) Type

func (m SHA512Hasher) Type() string

type StrToLower

type StrToLower struct{}

func (StrToLower) Encode

func (s StrToLower) Encode(input []byte) ([]byte, error)

func (StrToLower) HelpText

func (s StrToLower) HelpText() string

func (StrToLower) Type

func (s StrToLower) Type() string

type StrToUpper

type StrToUpper struct{}

func (StrToUpper) Encode

func (s StrToUpper) Encode(input []byte) ([]byte, error)

func (StrToUpper) HelpText

func (s StrToUpper) HelpText() string

func (StrToUpper) Type

func (s StrToUpper) Type() string

type Template

type Template struct {
	Data    []byte
	Keyword string
}

func (Template) Encode

func (t Template) Encode(input []byte) ([]byte, error)

func (Template) HelpText

func (t Template) HelpText() string

func (Template) Type

func (t Template) Type() string

type URLDecoder

type URLDecoder struct{}

func (URLDecoder) Encode

func (u URLDecoder) Encode(input []byte) ([]byte, error)

func (URLDecoder) HelpText

func (u URLDecoder) HelpText() string

func (URLDecoder) Type

func (u URLDecoder) Type() string

type URLEncoder

type URLEncoder struct{}

func (URLEncoder) Encode

func (u URLEncoder) Encode(input []byte) ([]byte, error)

func (URLEncoder) HelpText

func (u URLEncoder) HelpText() string

func (URLEncoder) Type

func (u URLEncoder) Type() string

type URLEncoderAll

type URLEncoderAll struct{}

func (URLEncoderAll) Encode

func (u URLEncoderAll) Encode(input []byte) ([]byte, error)

func (URLEncoderAll) HelpText

func (u URLEncoderAll) HelpText() string

func (URLEncoderAll) Type

func (u URLEncoderAll) Type() string

type UTF16BEEncode

type UTF16BEEncode struct{}

func (UTF16BEEncode) Encode

func (u UTF16BEEncode) Encode(input []byte) ([]byte, error)

func (UTF16BEEncode) HelpText

func (u UTF16BEEncode) HelpText() string

func (UTF16BEEncode) Type

func (u UTF16BEEncode) Type() string

type UTF16LEEncode

type UTF16LEEncode struct{}

func (UTF16LEEncode) Encode

func (u UTF16LEEncode) Encode(input []byte) ([]byte, error)

func (UTF16LEEncode) HelpText

func (u UTF16LEEncode) HelpText() string

func (UTF16LEEncode) Type

func (u UTF16LEEncode) Type() string

type UnicodeDecode

type UnicodeDecode struct{}

func (UnicodeDecode) Encode

func (u UnicodeDecode) Encode(input []byte) ([]byte, error)

func (UnicodeDecode) HelpText

func (u UnicodeDecode) HelpText() string

func (UnicodeDecode) Type

func (u UnicodeDecode) Type() string

type UnicodeEncodeAll

type UnicodeEncodeAll struct{}

func (UnicodeEncodeAll) Encode

func (u UnicodeEncodeAll) Encode(input []byte) ([]byte, error)

func (UnicodeEncodeAll) HelpText

func (u UnicodeEncodeAll) HelpText() string

func (UnicodeEncodeAll) Type

func (u UnicodeEncodeAll) Type() string

type XMLEscaper

type XMLEscaper struct{}

func (XMLEscaper) Encode

func (u XMLEscaper) Encode(input []byte) ([]byte, error)

func (XMLEscaper) HelpText

func (u XMLEscaper) HelpText() string

func (XMLEscaper) Type

func (u XMLEscaper) Type() string

type XMLInput

type XMLInput struct {
	Input string `xml:"input"`
}

type XMLUnescaper

type XMLUnescaper struct{}

func (XMLUnescaper) Encode

func (u XMLUnescaper) Encode(input []byte) ([]byte, error)

func (XMLUnescaper) HelpText

func (u XMLUnescaper) HelpText() string

func (XMLUnescaper) Type

func (u XMLUnescaper) Type() string

Jump to

Keyboard shortcuts

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