Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

uclaacm/cipher-salad-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cipher-salad-backend

A super small backend written for cipher-salad. This project makes use of another Go project developed in-house: teach-la-go-backend-tinycrypt, by Tomoki of the Teach LA dev team and ACM Design. Endpoint documentation below:

GET /cipher/:wordHash

Example Request

GET /cipher/cipher-salad-backend

Example Response

Status Code: 200 (OK)

{
    "shamt": 12,
    "plaintext": "this is what we will encode"
}

All failed or invalid requests will be met with a non-200 response and an error message.

POST /cipher

Example Request

POST /cipher

{
    "shamt": 1,
    "plaintext": "This is the content that was shifted by one."
}

Example Response

Status Code: 201 (Created)

three-word-hash

This three word hash can then be used in a call to GET /cipher/three-word-hash.

All failed or invalid requests will be met with a non-201, non-200 response and an error message.

Implementation Details

Aliases are actually just map[string]strings that hold a single value, whose field is specified through the aliasID constant in be.go.

All firebase operations are carried out in transactions.

About

The backend for cipher salad.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages