优化数据库表
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-19 16:40:17 +08:00
parent 4e7ce826c8
commit b98df9dae8
23 changed files with 876 additions and 971 deletions
+10 -5
View File
@@ -253,7 +253,7 @@ namespace IRaCIS.Application.Services
public string Code { get; set; }
}
public IResponseOutput TestEncreptTest(TestEncrept testModel)
public IResponseOutput TestEncreptTest(TestEncrept testModel)
{
return ResponseOutput.Ok(testModel);
}
@@ -276,6 +276,12 @@ namespace IRaCIS.Application.Services
{
var _IRCEncreptOption = _encreptResponseMonitor.CurrentValue;
var publicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPublicKey));
var privateKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPrivateKey));
Console.WriteLine(RSAEncryption.Encrypt(publicKey, MD5Helper.Md5("123456")));
string plainText = "Hello, BouncyCastle!";
string key = "12345678901234567890123456789012"; // AES 密钥长度应为 16 字节(128 位)
string iv = "your-iv-12345678"; // IV 长度为 16 字节
@@ -320,13 +326,12 @@ namespace IRaCIS.Application.Services
var publicKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPublicKey));
var privateKey = Encoding.UTF8.GetString(Convert.FromBase64String(_IRCEncreptOption.Base64RSAPrivateKey));
Console.WriteLine("Public Key:");
Console.WriteLine(privateKey);
Console.WriteLine("\nPrivate Key:");
Console.WriteLine(publicKey);
Console.WriteLine("\nPrivate Key:");
Console.WriteLine(privateKey);
Console.WriteLine("encrept sys Key:");
Console.WriteLine($"\n{RSAEncryption.Encrypt(publicKey, key)}");