Skip to content

techi602/cipher-text-api

Repository files navigation

Simple REST API server providing text encryption and decryption service.

Endpoints

POST /encrypt

parameters

  • text
  • password

response

{"ciphertext":"upYAR29CYgqPzkp5gclTuA=="}

POST /decrypt

parameters

  • ciphertext
  • password

response

{"text":"hello"}

Usage

encrypt text

curl -X POST -d 'text=hello&password=superSecretPassword' http://localhost:8000/encrypt

decrypt text

curl -X POST -d 'ciphertext=QPAy5ccigmxMXxmni9Cgng==&password=superSecretPassword' http://localhost:8000/decrypt

How to run

composer install
php -S 0.0.0.0:8000 public/index.php

Installation via docker

docker compose build
docker compose up

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published