subject

For some reason my code give m a error for when i try and grab the byte from this section. and i don't know what the problem is. static byte[] encryptstringtobytes_aes(string plaintext, byte[] key) { byte[] encrypted; byte[] iv; using (aes aesalg = aes. { aesalg. key = key; aesalg. generateiv(); iv = aesalg. iv; aesalg. mode = ciphermode. cbc; var encryptor = aesalg. createencryptor(aesalg. key, aesalg. iv); // create the streams used for encryption. using (var msencrypt = new { using (var csencrypt = new cryptostream(msencrypt, encryptor, cryptostreammode. write)) { using (var swencrypt = new streamwriter(csencrypt)) { //write all data to the stream. swencrypt. write(plaintext); } encrypted = msencrypt. toarray(); } } } var combinedivct = new byte[iv. length + encrypted. length]; array. copy(iv, 0, combinedivct, 0, iv. length); array. copy(encrypted, 0, combinedivct, iv. length, encrypted. length); // return the encrypted bytes from the memory stream. return combinedivct;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
question
Computers and Technology, 24.06.2019 00:00
Visualizing a game of ā€œtagā€ to remember the meaning of contagious
Answers: 3
You know the right answer?
For some reason my code give m a error for when i try and grab the byte from this section. and i don...
Questions
question
Mathematics, 18.10.2019 15:30
Questions on the website: 13722363