上传文件至 /

This commit is contained in:
itcsx 2026-05-15 11:33:41 +08:00
commit ea7e460f24

45
Program.cs Normal file
View File

@ -0,0 +1,45 @@
namespace WinFormsApp6
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
//string text = OcrSafeHelper.ReadText(@"C:\Users\Owenchen\Pictures\photo\vivos50.PNG");
//string text = OcrFinalHelper.RecognizeScreenshot(@"C:\Users\Owenchen\Pictures\photo\vivos50.PNG");
//string text = OcrLightGrayHelper.RecognizeLightGrayText(@"C:\Users\Owenchen\Pictures\photo\vivos50.PNG");
string text = OcrFinalHelper.RecognizeScreenshot(@"C:\Users\Owenchen\Pictures\photo\vivos50.PNG");
Console.WriteLine("识别结果:" + text);
RSA rSA = new RSA();
//公钥
string pubkey = rSA.ToPEM_PKCS1(true);
//私钥
string priKey = rSA.ToPEM_PKCS1();
//公钥加密
RSA rrSA = new RSA(pubkey, true);
string abc123=rrSA.Encode("abc123");
/*
let encrypt = new JSEncrypt();
encrypt.setPublicKey(key);
data.RsaUserPassword = encrypt
.encrypt(data.UserPassword + CryptoJS.MD5(state.LoginData.UserPassword))
.toString();
*/
//私钥解密
rrSA = new RSA(priKey, true);
string desc = rrSA.DecodeOrNull(abc123);
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
}
}