How encrypt with vector |
Hi
I use encryption library with AES cipher I need encrypt my data with vector but this library dont have any field or method about vector Please help me
What library are you using? OpenSSL can use a vector IV.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
OpenSSL creates the IV vector like this:
iv = initialization vector PHP Code: $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('AES-256-CBC')); openssl_cipher_iv_length What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-29-2020, 09:08 AM)InsiteFX Wrote: OpenSSL creates the IV vector like this:I know it but how do i use it in codeigniter encryption library?
Make sure that you are using the library version it has OpenSSL driver.
From viewing the library they are doing the vector using the key. PHP Code: $key = openssl_random_pseudo_bytes($length, $is_secure); As you can see above. The vector is from what I read just the length of the key. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-30-2020, 05:31 AM)InsiteFX Wrote: Make sure that you are using the library version it has OpenSSL driver. Doesn't the vector contain a series of characters? Do you can give me sample for use vector? Thanks
This is how it works from php.net
openssl_encrypt What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(01-30-2020, 01:03 PM)InsiteFX Wrote: This is how it works from php.netThanks |
Welcome Guest, Not a member yet? Register Sign In |