Skip to content

Dentrax/obscure-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[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.

Copyright

obscure-go was created by Furkan (Dentrax)

obscure-go