Categorygithub.com/stormentt/zpass-lib
repository
0.0.0-20180221002947-fd3dc7f68e37
Repository: https://github.com/stormentt/zpass-lib.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

GoDoc pipeline status

zpass-lib

utility library for the zpass server & client

Features

JSON Canister

Canister is an easy way to manage arbitrary JSON objects. It essentially decodes json objects into nested map[string]interface{}'s and allows access to nested properties with "path.to.property" style arguments Example:

canister.Get("server.database.host")
canister.Set("device.id", 123)

Cryptography interfaces

Zpass-lib provides two interfaces for cryptography: Crypter & Hasher. Both come with functions to generate/derive appropriately sized keys & nonces. I intend to support more than just ChaCha20-Poly1305 and HMAC-SHA512. Asymmetric cryptography support is on the way.

Crypter.Encrypt("message")

Nonce creation

Easy creation of timestamped nonces through the nonces package.

nonces.New()

Random

Easy generation of different types of cryptographically secure random generation through the crypto/rand package

  • Bytes(): Generates random bytes
  • Int(): Generates a random integer
  • AlphaNum(): Generates a random alphanumeric string

Utilities for commonly used functions

  • Json/B64 encoding/decoding
  • Asking for passwords with masking
  • Combining byte slices

Testing

Every package in zpass-lib has unit tests associated with them. Some of them even have benchmarks.

go test zpass-lib/crypt

Libraries used

Contributing

I'll review pull requests & potentially integrate them. I'll have a contribution guide eventually.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Tanner Storment - Everything so far

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Acknowledgements

  • Viper for inspiring the JSON canister syntax