JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SHA512 Calculator</title>
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre.min.css">
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-exp.min.css">
<link rel="stylesheet" href="https://unpkg.com/spectre.css/dist/spectre-icons.min.css">
<style>
pre{
font-size:60%;
word-break: break-all;
white-space: pre-wrap;
}
input, textarea{
width: 50%;
font-size: 80%;
}
@media only screen and (max-width: 768px) {
input, textarea{
width: 80%;
}
}
</style>
</head>
<body>
<div class="container">
<h4>Signature Key Calculator Tool</h4>
<form id="mainForm" onsubmit="convertString(); return false">
<label>order_id</label><br>
<input onkeyup="concatString();" id="orderid" type="text" value="Postman-1578568851"><br>
<label>status_code</label><br>
<input onkeyup="concatString();" id="statuscode" type="text" value="200"><br>
<label>gross_amount</label><br>
<input onkeyup="concatString();" id="grossamount" type="text" value="10000.00"><br>
<label>ServerKey</label><br>
<input onkeyup="concatString();" id="serverkey" type="text" value="VT-server-HJMpl9HLr_ntOKt5mRONdmKj"><br><br>
<label>Appended String: order_id+status_code+gross_amount+serverkey</label>
<br>
<textarea name="inputString" id="inputString" rows="2"></textarea>
<br>
<input class="btn btn-primary" type="submit" value="Calculate hash">
</form>
<div>
<br>
<b>signature_key formula:</b>
<br>
<code>sha512(order_id+status_code+gross_amount+serverkey)</code>
<br>
</div>
<br>
<hr>
<div>
<br>
<b>Hash SHA512 Signature Result</b>
<br><br>
<textarea name="outputString" id="outputString" rows="4"...