Skip to content

nattapat0255/Encryption-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encryption-API

Project setup

pip install -r requirements.txt

Compiles

export FLASK_APP=api.py
flask run 

Unittest

python test.py 

API Documentation

  1. POST Encrypt
POST http://localhost:5000/encrypt (with JSON Body)
{
  "data" : [
    {
        "text": "Message1"
    },
    {
        "text": "Message2"
    }
  ]
}

Response

{
  "data": [
      {
          "encrpyted": "5TkOr3EEVZJmfn4OtCePTsPBCLGrejdsMr3c2di1kC0="
      },
      {
          "encrpyted": "4E474hXY9smf7YDyf82FAW0SvLo00MGOCZLcn5rf1m4="
      }
  ]
}
  1. POST Decrypt
POST http://localhost:5000/decrypt (with JSON Body)
{
  "data": [
      {
          "encrpyted": "5TkOr3EEVZJmfn4OtCePTsPBCLGrejdsMr3c2di1kC0="
      },
      {
          "encrpyted": "4E474hXY9smf7YDyf82FAW0SvLo00MGOCZLcn5rf1m4="
      }
  ]
}

Response

{
  "data" : [
    {
        "text": "Message1"
    },
    {
        "text": "Message2"
    }
  ]
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages