JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="ru">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Pi</title>
</head>
<body>
<h3>Enter a mathematical constant:</h3>
<textarea class="form-textarea" rows="7" cols="64" name="text" id="text"></textarea><br><br>
<input type="button" class="form-submit" value="Create" onclick="narezka()"><br><br>
<strong>Private Key (64):</strong><br>
<pre...
JavaScript
function narezka() {
text = $("#text").val().replaceAll(/\s/g, '');
chunkLength = Math.min(text.length, 64);
result = "";
if (chunkLength > 0) {
for (let i = 0; i <= text.length - chunkLength; i++) {
result += text.substring(i, i + chunkLength) + "\n";
}
}
result = result.trim();
$("#result").text(result);
}