obscure-go

module
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

README

obscure-go

[W.I.P] In-memory secure types framework for Go.

MIT Go Report Build Status Build Status GitHub release


Supports

  • SecureInteger
  • SecureString

Usage

Importing

import (
	secure "github.com/Dentrax/obscure-go/types"
)

Creating

secInt := secure.NewInt(15)
secStr := secure.NewString("foo")

Hack Detecting

// Importing
import (
	secure "github.com/Dentrax/obscure-go/types"
)

// Creating
w := obs.CreateWatcher("watcher")

// Attaching
secInt.AddWatcher(w)
secStr.AddWatcher(w)

Function Interfaces

Integer

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
}

String

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

Example

  • Non-Secure
$ go run ./examples/games/nonsecure/game_nonsecure.go
  • Secure
$ go run ./examples/games/secure/game_secure.go 

License

The base project code is licensed under MIT License unless otherwise specified. Please see the LICENSE file for more information.

obscure-go was created by Furkan (Dentrax)

obscure-go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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