Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/844196/ncipher
- Owner: 844196
- License: mit
- Created: 2017-04-18T10:11:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-12T07:50:46.000Z (over 7 years ago)
- Last Synced: 2024-06-20T10:22:11.327Z (5 months ago)
- Language: Go
- Homepage: https://godoc.org/github.com/844196/ncipher
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ncipher
ncipher provides "Nyanpasu Cipher (N-Cipher)" encoder & decoder
## Usage
```go
package mainimport (
"fmt""github.com/844196/ncipher"
)func main() {
src := "われわれはかしこいので"
out := ncipher.StdEncoding.Encode(src)fmt.Println(out)
// Output: ぱすすんゃゃ〜ぱすすんにぱ〜ぱすすんゃゃ〜ぱすすんにぱ〜ぱすすにすす〜ぱすぱすんぱ〜ぱすすににに〜ぱすぱすすゃ〜ぱすぱすゃゃ〜ぱすすにすぱ〜ぱすすにぱゃ〜
}
``````go
package mainimport (
"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
```