提供测试使用的加解密验证工具🔧
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

148 lines
5.1 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<style>
#one {
float: left;
/*display: inline-block;*/
width: 50%;
height: 40%;
word-wrap: break-word;
/*// border-bottom: 3px solid red;*/
}
#two {
/*display: inline-block;*/
float: right;
position: relative;
width: 50%;
height: 40%;
}
</style>
<meta charset="UTF-8">
<title>测试系统加密</title>
<script type="text/javascript" src="jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="base64.min.js"></script>
</head>
<body>
<div class="FGH delivery_day left col-md-4" id="one">
<div align="center">
<h2>RSA</h2>
<textarea rows="20" cols="80" id="rsa-textarea"></textarea>
<br>
<input type="button" id="rsa-encrypt" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="rsaEncrypt()">
<input type="button" id="rsa-decrypt" value="解密" style="width:120px;height:40px;font-size:20px;"
onclick="rsaDecrypt()">
<input type="file"
id="rsa-key" name="avatar" align="right"
accept=".txt">
</div>
<br>
<br>
<br>
<div align="center">
<h2>RSA-种子</h2>
<textarea rows="20" cols="80" id="rsa-textarea-with-seed"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="rsaEncryptWithSeed()">
<input type="button" value="解密" style="width:120px;height:40px;font-size:20px;"
onclick="rsaDecryptWithSeed()">
<input type="file" multiple
id="rsa-key-with-seed" name="avatar">
</div>
<br>
<br>
<br>
<div align="center">
<h2>国密</h2>
<textarea rows="20" cols="80" id="sm2-textarea"></textarea>
<br>
<input type="button" id="sm2-encrypt" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="sm2Encrypt()">
<input type="button" id="sm2-decrypt" value="解密" style="width:120px;height:40px;font-size:20px;"
onclick="sm2Decrypt()">
<input type="file"
id="sm2-key" name="avatar" align="right"
accept=".txt">
</div>
<br>
<br>
<br>
<div align="center">
<h2>国密-种子</h2>
<textarea rows="20" cols="80" id="sm2-textarea-with-seed"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;" onclick="sm2EncryptWithSeed()">
<input type="button" value="解密" style="width:120px;height:40px;font-size:20px;" onclick="sm2DecryptWithSeed()">
<input type="file" multiple
id="sm2-key-with-seed">
</div>
<br>
<br>
<br>
<div align="center">
<h2>商用国密</h2>
<textarea rows="20" cols="80" id="sm2-textarea-custom"></textarea>
<br>
<input type="button" id="sm2-encrypt-custom" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="sm2CustomEncrypt()">
<input type="button" id="sm2-decrypt-custom" value="解密" style="width:120px;height:40px;font-size:20px;"
onclick="sm2CustomDecrypt()">
<input type="file"
id="sm2-key-custom" name="avatar" align="right"
accept=".txt">
</div>
<br>
<br>
<br>
</div>
<div class="FGH delivery_day left col-md-4" id="two">
<div align="center">
<h2>传输-AES</h2>
<textarea rows="20" cols="80" id="aes-textarea"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;" onclick="aesEncrypt()">
<input type="button" value="解密" style="width:120px;height:40px;font-size:20px;" onclick="aesDecrypt()">
<input type="text" id="aes-key" value="fOvwPYPkUmVYjnAO"/>
</div>
<br>
<br>
<br>
<div align="center">
<h2>传输-国密</h2>
<textarea rows="20" cols="80" id="sm4-textarea"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;" onclick="sm4Encrypt()">
<input type="button" value="解密" style="width:120px;height:40px;font-size:20px;" onclick="sm4Decrypt()">
<input type="text" id="sm4-key" value="edbfbd27db981534b1356d14f0e9bef9"/>
</div>
<br>
<br>
<br>
<div align="center">
<h2>SHA256</h2>
<textarea rows="20" cols="80" id="sha-textarea"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="sha()">
</div>
<br>
<br>
<br>
<div align="center">
<h2>国密-单向</h2>
<textarea rows="20" cols="80" id="sm3-textarea"></textarea>
<br>
<input type="button" value="加密" style="width:120px;height:40px;font-size:20px;"
onclick="sm3()">
</div>
<br>
<br>
<br>
</div>
<script type="text/javascript" src="index.js"></script>
</body>
</html>