In this topic, I will be talking about encryption and decryption using OpenSSL in PHP. I will be bebriefly discussing what “two way encryption” is and how to use it in your PHP application using OpenSSL encrypt and decrypt methods with a readily usable example. At the end of this page there will be a zip file where you can download and run the example.
Two way encryption (encryption and decryption) is the simplest way of securely sending some sensitve information over the Internet using a shared secret key. To make things understandble picture this scenario. A web user fills a form with some data and press the submit button. When the form is submitted, data will go from place A to place B. If we send data as it is, anyone (i.e. Spy) has access to data packets can open and see what’s inside. So, before sending data as it is we will use a convertion method (encryption) to transform human readable data (i.e. Plain text) into a human unreadable format (i.e. Cipher text). Then the receiving end will perform a data convertion exercise (decryption) to transform data back to readable format.
How are you doing? Seems like my fingers do not want me to stay away from Symfony2 despite the Spring Bank Holiday. 🙂
Today, I am going to talk about how to call an Oracle Function in Symfony2. A function (aka stored function) is a collection of SQL statements which is used to perform various different activities within the Database. The good thing about the function is you can write your chunks of SQL inside the function and call it using a name to initiate. I will be focusing on how to call an Oracle Function in Symfony2 and if you would like to know more about Oracle functions please click here.
First, let’s take a look at a sample function which I have created and is saved in Oracle 12c Database.
create or replace
FUNCTION testFunc123(old_bname IN VARCHAR2)
RETURN VARCHAR2 IS
IF old_bname = 'TEST' THEN
The role of the above created Oracle function is to check whether the value of ‘old_name’ is equal to ‘TEST’ or not. If it is ‘TEST’, then the function will return ‘Y’ otherwise ‘N’. So, now what we going to do is call this function inside a Symfony2 controller. This is really easy, thankfully to wonderful Doctrine2.
How are you all doing? Last week, I got an opportunity to witness some hot, sports cars in Gumball3000. Gumball3000 was held on 2nd May 2016 (Bank Holiday) at Regent Street, Central London. That was quite fun and there were a plethora of expensive sports cars roaming through the Regent Street. I got some pictures during the event and I would like to share those images with you. Some of these images were taken by @gtiranda. Thanks Iranda for those images. Enjoy my PhotoBucket album below 🙂
Last but not least, I got my eyes lucky enough to see my childhood hero David Hasselhoff during Gumball3000 and here is the video that I have recorded 🙂
Sinks our whole soul, when it arrives
Unshakable flow coming along, when it hits the pot
Turning down becomes a powerless effort
Dwelling too much isn’t too good as it steals yourself from you
You will forget your breath and largest rock goes unnoticed
Standing and walking becomes lighter than never before
But, flying is still an unachievable dream
People around you will try to show the easy way out
But, this is a battle between you and yourself
Looking down as you are counting shells on the beach
Your eyes will meet everything but no shells on the sand Continue reading →