简体   繁体   中英

iOS - How to generate random IV in ECB mode?

I want to generate random IV in iOS which is base on the below code:

mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);

Is anybody can tell me how to generate random IV in iOS same with the above php? Thank you.

This question is unanswerable (it's akin to "what is the sound of one hand clapping?"), but in the interest of guiding people who come upon it in the future:

What to do instead: See this answer .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM