types

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const KEY int = 54343

Variables

This section is empty.

Functions

This section is empty.

Types

type ISecureInt

type ISecureInt interface {
	Apply() ISecureInt
	AddWatcher(obs obs.Observer)
	SetKey(int)
	Inc() ISecureInt
	Dec() ISecureInt
	Set(int) ISecureInt
	Get() int
	GetSelf() *SecureInt
	Decrypt() int
	RandomizeKey()
	IsEquals(ISecureInt) bool
}

func NewInt

func NewInt(value int) ISecureInt

type ISecureString

type ISecureString interface {
	Apply() ISecureString
	AddWatcher(obs obs.Observer)
	SetKey(int)
	Set(string) ISecureString
	Get() string
	GetSelf() *SecureString
	Decrypt() []rune
	RandomizeKey()
	IsEquals(ISecureString) bool
}

func NewString

func NewString(value string) ISecureString

type SecureInt

type SecureInt struct {
	obs.Observable
	Key           int
	RealValue     int
	FakeValue     int
	Initialized   bool
	HackDetecting bool
}

func (*SecureInt) AddWatcher

func (i *SecureInt) AddWatcher(obs obs.Observer)

func (*SecureInt) Apply

func (i *SecureInt) Apply() ISecureInt

func (*SecureInt) Dec

func (i *SecureInt) Dec() ISecureInt

func (*SecureInt) Decrypt

func (i *SecureInt) Decrypt() int

func (*SecureInt) Get

func (i *SecureInt) Get() int

func (*SecureInt) GetSelf

func (i *SecureInt) GetSelf() *SecureInt

func (*SecureInt) Inc

func (i *SecureInt) Inc() ISecureInt

func (*SecureInt) IsEquals

func (i *SecureInt) IsEquals(o ISecureInt) bool

func (*SecureInt) RandomizeKey

func (i *SecureInt) RandomizeKey()

func (*SecureInt) Set

func (i *SecureInt) Set(value int) ISecureInt

func (*SecureInt) SetKey

func (i *SecureInt) SetKey(key int)

func (*SecureInt) XOR

func (i *SecureInt) XOR(value int, Key int) int

type SecureString

type SecureString struct {
	obs.Observable
	Key           int
	RealValue     []rune
	FakeValue     string
	Initialized   bool
	HackDetecting bool
}

func (*SecureString) AddWatcher

func (i *SecureString) AddWatcher(obs obs.Observer)

func (*SecureString) Apply

func (i *SecureString) Apply() ISecureString

func (*SecureString) Decrypt

func (i *SecureString) Decrypt() []rune

func (*SecureString) Get

func (i *SecureString) Get() string

func (*SecureString) GetSelf

func (i *SecureString) GetSelf() *SecureString

func (*SecureString) IsEquals

func (i *SecureString) IsEquals(o ISecureString) bool

func (*SecureString) RandomizeKey

func (i *SecureString) RandomizeKey()

func (*SecureString) Set

func (i *SecureString) Set(value string) ISecureString

func (*SecureString) SetKey

func (i *SecureString) SetKey(key int)

func (*SecureString) XOR

func (i *SecureString) XOR(value []rune, key int) []rune

Jump to

Keyboard shortcuts

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