Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hyukisback/simple-.net-loader
well-known as crypter or stub
https://github.com/hyukisback/simple-.net-loader
Last synced: about 1 month ago
JSON representation
well-known as crypter or stub
- Host: GitHub
- URL: https://github.com/hyukisback/simple-.net-loader
- Owner: HyukIsBack
- Created: 2022-01-06T13:52:21.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-22T06:18:02.000Z (almost 3 years ago)
- Last Synced: 2024-10-25T04:52:26.671Z (3 months ago)
- Language: C#
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple .NET Loader
well-known as crypter or stub# Encrypt Code
```C#
public static string Encrypt(string textToEncrypt, string key)
{
RijndaelManaged RijndaelCipher = new RijndaelManaged();
byte[] PlainText = Encoding.Unicode.GetBytes(textToEncrypt);
byte[] Salt = Encoding.ASCII.GetBytes(key.Length.ToString());
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(key, Salt);
ICryptoTransform Encryptor = RijndaelCipher.CreateEncryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream();
CryptoStream cryptoStream = new CryptoStream(memoryStream, Encryptor, CryptoStreamMode.Write);
cryptoStream.Write(PlainText, 0, PlainText.Length);
cryptoStream.FlushFinalBlock();
byte[] CipherBytes = memoryStream.ToArray();
memoryStream.Close();
cryptoStream.Close();
return Convert.ToBase64String(CipherBytes);
}
```For educational