IFTIIN-Crypt API provides unlimited access to encoding and decoding text messages using a given key. You can freely use the endpoints of this API to create your own apps.
This endpoint accepts text message data and a secret key as input. At the output, the user receives a JSON object with an encoded message.
POST /api/encrypt
{
"data": "Your message",
"key": "Your key"
}
This endpoint accepts an encrypted text message and a secret key as input. At the output, the user receives a JSON object with a decrypted message.
POST /api/decrypt
{
"data": "Encrypted message",
"key": "Secret key"
}
The reliability of the encrypted message depends on the specified key. Ideally, the key should be randomly generated and have a message length. To do this, you can use our built-in key generator.
GET /api/keygen
Key length parameter:
?length=32
Presence of symbols (1 - true, 0 - false):
?symbols=1
JavaScript:
const encryptData = async () => {
try {
const url = 'http://localhost:5000/api/encrypt';
const jsonData = JSON.stringify({
data: "Hello world!", key: "secret"
});
let response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
body: jsonData
});
const result = await response.json();
console.log(result);
} catch (error) {
console.error(error);
}
}