Skip to content

wealdtech/go-ecodec

Repository files navigation

go-ecodec

Tag License GoDoc Travis CI codecov.io Go Report Card

Go module providing encryption and decryption of byte-level data.

Table of Contents

Install

go-ecodec is a standard Go module which can be installed with:

go get github.com/wealdtech/go-ecodec

Usage

Example

package main

import (
    "fmt"

    ecodec "github.com/wealdtech/go-ecodec"
)

func main() {
    data := []byte("The data to be encrypted")
    key := []byte("my secret passphrase")

    encryptedData, err := ecodec.Encrypt(data, key)
    if err != nil {
        panic(err)
    }

    decryptedData, err := ecodec.Decrypt(encryptedData, key)
    if err != nil {
        panic(err)
    }

    fmt.Printf("Decrypted data is %q\n", string(decryptedData))
}

Maintainers

Jim McDonald: @mcdee.

Contribute

Contributions welcome. Please check out the issues.

License

Apache-2.0 © 2019 Weald Technology Trading Ltd

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages