An open API service indexing awesome lists of open source software.

https://github.com/dentrax/obscure-go

In-memory security with secure data types
https://github.com/dentrax/obscure-go

data-type in-memory-security memory-safety memory-security obscure obscure-code

Last synced: 8 months ago
JSON representation

In-memory security with secure data types

Awesome Lists containing this project

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

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

## Creating

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

## Hack Detecting

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

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

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

# Function Interfaces

## Integer

```go
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

```go
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

```bash
$ go run ./examples/games/nonsecure/game_nonsecure.go
```

* Secure

```bash
$ 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](https://github.com/Dentrax/obscure-go/blob/master/LICENSE)** file for more information.

# Copyright

_obscure-go_ was created by Furkan ([Dentrax](https://github.com/Dentrax))

obscure-go