zpass-lib

module
v0.0.0-...-fd3dc7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2018 License: GPL-3.0

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

Directories

Path Synopsis
Package canister provides a dynamically allocated nested map structure for storing and retrieving arbitrary values.
Package canister provides a dynamically allocated nested map structure for storing and retrieving arbitrary values.
Package nonces provides functions for generating unique nonces for use in APIs
Package nonces provides functions for generating unique nonces for use in APIs
Package random provides functions for generating cryptographically secure random values
Package random provides functions for generating cryptographically secure random values
Package util provides utility functions for doing common operations such as encoding base64
Package util provides utility functions for doing common operations such as encoding base64
slices
Package slices provides utilities for working with slices
Package slices provides utilities for working with slices
Package zcrypto provides easy to use cryptographic interfaces.
Package zcrypto provides easy to use cryptographic interfaces.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL