0

How to get iv and cipherText in decryptAESCTR() from iv used in encryptAESCTR()

I wirte decryptAESCTR() a little bit but I don't know well how to get the variables iv and cipherText by using FileInputStream if someone know to get two variables through Fileinputstream. Please teach and tell me about that. I put my code as bleow: https://code.sololearn.com/cBGjoAgvnJ1B/?ref=app

25th Jan 2020, 4:44 AM
SeungSeungìž„ê”Ź
SeungSeungìž„ê”Ź - avatar
5 Answers
+ 1
Take a look at this minimal example of using FileInputStream to .read() bytes from a file. https://code.sololearn.com/c0yTP2ge9FeE/?ref=app
25th Jan 2020, 6:52 AM
Fermi
Fermi - avatar
+ 1
SeungSeungìž„ê”Ź Just make your initVector[] as large as needed.
25th Jan 2020, 2:13 PM
Fermi
Fermi - avatar
0
Fermi but how to store the data into byte initVector[] as much as I want?
25th Jan 2020, 1:41 PM
SeungSeungìž„ê”Ź
SeungSeungìž„ê”Ź - avatar
0
notice byte in java can stores values only from -127 to 127
25th Jan 2020, 1:54 PM
zemiak
0
zemiak Iv is just 16bytes and then the rest of them is under thr 127 bytes. I hope to know how to store cipherText.enc into the byte[].
25th Jan 2020, 2:06 PM
SeungSeungìž„ê”Ź
SeungSeungìž„ê”Ź - avatar