GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Edgio/ectoken: Token Generator for Edgio Token-Based Authentication from Edgio

BranchesTags
Open more actions menu

Latest commit

 

History

46 Commits
46 Commits

Folders and files

NameName
Last commit message
Last commit date
tests
tests
 
 
util
util
 
 
.gitignore
.gitignore
 
 
LICENSE-2.0.txt
LICENSE-2.0.txt
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
base64.c
base64.c
 
 
base64.h
base64.h
 
 
ectoken.c
ectoken.c
 
 
ectoken.h
ectoken.h
 
 

Repository files navigation

ectoken

C implementation of Edgio token (ectoken)

Table of Contents

  • Background
  • Install
  • Usage
  • Contribute
  • License

Background

C implementation of the "Edgio Token" (ectoken), an AES-GCM token.

Install

The C implementation requires gcc to build and OpenSSL libcryptoto link.

Building with Make

To build, run the make command.

ectoken>make
gcc -O2 -Wall -Werror -std=gnu99 util/ectoken_cmd.c -I. ectoken.c base64.c -o ectoken -lcrypto  -lm
cc    -c -o ectoken.o ectoken.c
cc    -c -o base64.o base64.c
ar rcs libectoken.a ectoken.o base64.o

This will build a library and an executable (ectoken) for command line usage.

Running tests

Run make test from the project directory.

ectoken>make test
gcc -O2 -Wall -Werror -std=gnu99 util/ectoken_cmd.c -I. ectoken.c base64.c -o ectoken -lcrypto  -lm
cc    -c -o ectoken.o ectoken.c
cc    -c -o base64.o base64.c
ar rcs libectoken.a ectoken.o base64.o
gcc -std=c99 -I. tests/ectoken_test.c -lcrypto -lm -o ectoken_test
./ectoken_test
test_short_size_calculations
success
...
test_full_flow
success

test_full_flow
success

Usage

Help

>./ectoken 
Error wrong number of arguments specified
Usage: 
 To Encrypt:
     ectoken <key> <text>
 or:
     ectoken encrypt <key> <text>
 To Decrypt:
     ectoken decrypt <key> <text>

Encrypt

Encrypt clear text token <token> with key: <key>:

>./ectoken encrypt MY_SECRET_KEY MY_COOL_TOKEN
fVSYBBTynMkvQECGV-Kdfp333R-MGY2fsrrpVyuqd7OiuAUsQ8ITrL0

Decrypt

Decrypt ciphertext token <token> with key: <key>:

>./ectoken decrypt MY_SECRET_KEY fVSYBBTynMkvQECGV-Kdfp333R-MGY2fsrrpVyuqd7OiuAUsQ8ITrL0
MY_COOL_TOKEN

Contribute

  • We welcome issues, questions and pull requests.

License

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to the LICENSE-2.0.txt file for the full terms.

About

Token Generator for Edgio Token-Based Authentication from Edgio

Resources

Readme
Activity
Custom properties

Stars

23 stars

Watchers

18 watching

Forks

38 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.