Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/844196/ncipher

ncipher provides "Nyanpasu Cipher (N-Cipher)" encoder & decoder
https://github.com/844196/ncipher

Last synced: 27 days ago
JSON representation

ncipher provides "Nyanpasu Cipher (N-Cipher)" encoder & decoder

Awesome Lists containing this project

README

        


ncipher












ncipher provides "Nyanpasu Cipher (N-Cipher)" encoder & decoder

## Usage

```go
package main

import (
"fmt"

"github.com/844196/ncipher"
)

func main() {
src := "われわれはかしこいので"
out := ncipher.StdEncoding.Encode(src)

fmt.Println(out)
// Output: ぱすすんゃゃ〜ぱすすんにぱ〜ぱすすんゃゃ〜ぱすすんにぱ〜ぱすすにすす〜ぱすぱすんぱ〜ぱすすににに〜ぱすぱすすゃ〜ぱすぱすゃゃ〜ぱすすにすぱ〜ぱすすにぱゃ〜
}
```

```go
package main

import (
"fmt"

"github.com/844196/ncipher"
)

func main() {
enc, _ := ncipher.NewEncoding(ncipher.Config{
Seed: "あいうえおかきくけこさしすせそたちつてとなにぬねの",
Delimiter: "、",
})

src := "ふーbar ほげfuga"

encoded := enc.Encode(src)
fmt.Println(encoded)
// Output: とにか、ないた、えね、えぬ、おそ、いく、とにし、ととな、おう、おつ、おえ、えぬ、

decoded, _ := enc.Decode(encoded)
fmt.Println(decoded)
// Output: ふーbar ほげfuga
}
```

## Installation

```console
$ go get github.com/844196/ncipher
```