Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.77 KB

README.md

File metadata and controls

69 lines (47 loc) · 1.77 KB

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