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 11:00
Ihave an iphone 8plus should i get another phone like samsung note 9 or s9 ? ?
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
1. which of the following is not an example of an objective question? a. multiple choice. b. essay. c. true/false. d. matching 2. why is it important to recognize the key word in the essay question? a. it will provide the answer to the essay. b. it will show you a friend's answer. c. it will provide you time to look for the answer. d. it will guide you on which kind of answer is required.
Answers: 1
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, 19.08.2021 01:30
question
Mathematics, 19.08.2021 01:30
question
Mathematics, 19.08.2021 01:40
question
Mathematics, 19.08.2021 01:40
Questions on the website: 13722360