Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keichan34/elixir_tea

TEA implementation in Elixir
https://github.com/keichan34/elixir_tea

Last synced: about 1 month ago
JSON representation

TEA implementation in Elixir

Awesome Lists containing this project

README

        

TEA
===

[![Build Status](https://travis-ci.org/keichan34/elixir_tea.svg?branch=master)](https://travis-ci.org/keichan34/elixir_tea)

A TEA (Tiny Encryption Algorithm) implemented in pure Elixir.

## Usage

### Encryption

```elixir
text = <<0 :: unsigned-64>>
key = <<0 :: unsigned-128>>
TEA.encrypt text, key
=> <<65, 234, 58, 10, 148, 186, 169, 64>>
```

### Decryption

```elixir
ciphertext = <<65, 234, 58, 10, 148, 186, 169, 64>>
key = <<0 :: unsigned-128>>
TEA.decrypt ciphertext, key
=> <<0, 0, 0, 0, 0, 0, 0, 0>>
```