Skip to content
ToolsOnDuty - free online tools
ToolsOnDuty / docs
Browse documentation

Reference / Ciphers

Ciphers API

5 endpoints for ciphers workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/ciphers/atbash1 credit / call

Atbash cipher

Atbash cipher: maps A<->Z, B<->Y, etc. Symmetric (running it again decodes).

ParameterTypeRequiredDescription
textstringYesText to transform.

Request

curl -X POST https://toolsonduty.com/api/v1/ciphers/atbash \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello"}'

Response

{
  "ok": true,
  "data": {
    "result": "svool"
  }
}
POST/v1/ciphers/rot471 credit / call

ROT47 cipher

ROT47: shifts printable ASCII by 47. Symmetric (running it again decodes).

ParameterTypeRequiredDescription
textstringYesText to transform.

Request

curl -X POST https://toolsonduty.com/api/v1/ciphers/rot47 \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello"}'

Response

{
  "ok": true,
  "data": {
    "result": "96==@"
  }
}
POST/v1/ciphers/vigenere1 credit / call

Vigenère cipher

Encrypt or decrypt text with the Vigenère cipher using a keyword (letters only).

ParameterTypeRequiredDescription
textstringYesText to transform.
keystringYesKeyword (letters A-Z).
decryptbooleanNoDecrypt instead of encrypt. Default: false.

Request

curl -X POST https://toolsonduty.com/api/v1/ciphers/vigenere \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"attackatdawn","key":"lemon"}'

Response

{
  "ok": true,
  "data": {
    "result": "lxfopvefrnhr"
  }
}
POST/v1/ciphers/rail-fence1 credit / call

Rail fence cipher

Encrypt or decrypt text with the rail fence (zigzag) transposition cipher.

ParameterTypeRequiredDescription
textstringYesText to transform.
railsnumberYesNumber of rails (2 or more).
modestringNoencrypt | decrypt. Default: encrypt.

Request

curl -X POST https://toolsonduty.com/api/v1/ciphers/rail-fence \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"WEAREDISCOVEREDFLEEATONCE","rails":3}'

Response

{
  "ok": true,
  "data": {
    "result": "WECRLTEERDSOEEFEAOCAIVDEN"
  }
}
POST/v1/ciphers/xor1 credit / call

XOR cipher

Encrypt text to hex with a repeating XOR key, or decrypt hex produced the same way.

ParameterTypeRequiredDescription
textstringYesmode=encrypt: plain text. mode=decrypt: hex string.
keystringYesXOR key.
modestringNoencrypt | decrypt. Default: encrypt.

Request

curl -X POST https://toolsonduty.com/api/v1/ciphers/xor \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello","key":"k"}'

Response

{
  "ok": true,
  "data": {
    "result": "030e070704"
  }
}