I'm making a tool that uses C # to encrypt AES256 file contents and write them to another file.
Encryption itself has been completed successfully, but I don't know if this is properly encrypted with "AES256/CBC" = correct answer.
If i have OpenSSL etc., you can do it from the command line, but unfortunately you can't enter JAVA or PHP.
Isn't there a tool that can do "AES256/CBC file encryption by specifying a key and IV" with a Windows tool somewhere from a browser?
By the way, the code is as follows.
// Get file size FileInfo file = new FileInfo (files [i]); long size = file.Length; // Read area memory allocation byte  readBuff = new byte [size]; // Secure encryption area memory byte  angoBuff = new byte [size]; // read file // Open the file System.IO.FileStream fsR = new System.IO.FileStream ( files [i], System.IO.FileMode.Open, System.IO.FileAccess.Read); // read all the contents of the file fsR.Read (readBuff, 0, readBuff.Length); //close up fsR.Close (); // encryption AesManaged Aes = new AesManaged (); // Encryption settings Aes.BlockSize = 128;// 128bit Aes.KeySize = 128;// 128bit Aes.Mode = CipherMode.CBC; Aes.Padding = PaddingMode.PKCS7; Aes.Key = System.Text.Encoding.ASCII.GetBytes (@ "1234567890ABCDEF"); Aes.IV = System.Text.Encoding.ASCII.GetBytes (@ "FEDCBA0987654321"); // encryption ICryptoTransform encryptor = Aes.CreateEncryptor (Aes.Key, Aes.IV); // Write the encrypted information to the encryption area angoBuff = encryptor.TransformFinalBlock (readBuff, 0, (int) size); // Write file name generation // cut out only the file name String FileName = System.IO.Path.GetFileName (files [i]); // Write full path name assembly String WriteFullPath = System.IO.Path.Combine (Dest_TextBox.Text, FileName); // write file System.IO.FileStream fsW = new System.IO.FileStream ( WriteFullPath, System.IO.FileMode.Create, System.IO.FileAccess.Write); // Write all the contents of the byte array fsW.Write (angoBuff, 0, (int) angoBuff.Length); //close up fsW.Close ();
Answer # 1
Is it possible to create something to decrypt and if it can be successfully decrypted, would it have been encrypted?
Answer # 2
The most certain is to introduce precompiled OpenSSL (command, not library)
I think the next point will introduce openssl in msys2/cygwin.
An alternative is to use openssl from Git bash on Git for Windows.
You can use the openssl command by examining it.
If you can't install git, you can use web crypt api from your browser.
Answer # 3
In verification using a different language, you will want to check the optional parameters, so you should prepare your own.
How about creating an appropriate environment around heroku?
If you don't need to leave the code, you can use paiza.io.
Example of encryption using PHP's OpenSSL function
Answer # 4
Isn't it faster to search than to ask?
If you googled it was like this.
How about verifying multiple sentences with short sentences?
AES/256/EBC encryption/decryption tool
If the results are different, I can't confirm if the original code is bad or the tool is bad ...
- how to use c # fields and properties properly
- c # - trigger stops working when i get the control in controltemplate in code-behind and rewrite the property
- insert not working properly with mysql connector for python
- program not working properly in python
- c # - zbar of qr code reading library cannot be used properly
- c # - fixed bool switch does not work properly in fixed update of unity
- Fix solution for yum not working properly after upgrading Python from CentOS7 to 36
- it works normally in wpf c # debug, but does not work properly in release
- c # - android designer not working
- c # - unity intellisense not working
- nodejs - vuetify not working properly
- laravel - lalabel installation is not working properly
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- python 3x - typeerror: 'method' object is not subscriptable
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - unresolved reference comes out in kotlin