{"id":32520,"date":"2023-01-22T20:21:09","date_gmt":"2023-01-22T20:21:09","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32520"},"modified":"2023-01-22T20:21:11","modified_gmt":"2023-01-22T20:21:11","slug":"encryption-using-public-key-and-private-key-in-php-using-mysql-database","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/encryption-using-public-key-and-private-key-in-php-using-mysql-database\/","title":{"rendered":"Encryption using Public key and Private key in PHP using mySql database"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Write a php code for generating public key and private key on page one and on page two encrypt user entered data using public key and store the encrypted data in mysql database and on page three decrypt encrypted data from mysql database and display on screen.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Here is an example of generating a public and private key pair on page one, encrypting data on page two using the public key, storing the encrypted data in a MySQL database, and then decrypting the data on page three using the private key and displaying it on the screen in PHP:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/9bead08cd3419aa3bfc4d1d31fc7c588.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>Write a php code for generating public key and private key on page one and on page two encrypt user entered data using public key and store the encrypted data in mysql database and on page three decrypt encrypted data from mysql database and display on screen. Here is an example of generating a public&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-32520","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=32520"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32520\/revisions"}],"predecessor-version":[{"id":32521,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32520\/revisions\/32521"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}