Encryption PHP

1,706 views

Published on

Learn how encrypt and decrypt data in ProdigyView.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,706
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Encryption PHP

  1. 1. Encryption
  2. 2. OverviewObjectiveLearn how to encrypt and decrypt data.Requirements Version of ProdigyViewEstimated Time8 Minutes www.prodigyview.com
  3. 3. Follow Along With Code Example1. Download a copy of the example code at www.prodigyview.com/source.2. Install the system in an environment you feel comfortable testing in.3. Proceed to examples/security/Encryption.php
  4. 4. Encrpytion A NightmareThe first time coming across encryption and php mcryptcan be something like this:
  5. 5. Encryption Made EasyThankfully encryption is not like that in ProdigyView. Startthis example by calling the PVSecurity::init and letscreate a string to encrypt.1. Initialize the security class 2. String to encode
  6. 6. Encrypting DataEncrypting data is easily accomplished by passing datainto the PVSecurity::encrypt method. Encrypt the string
  7. 7. Encrypting StringTrying to read an encrypted string will give you this result.To read that message, we have to decrypt the message inPVSecurity::decrypt
  8. 8. Encrypting with KeyBy default, the key used is defined in thePVSecurity::init. A custom key can be used whenencrypting a string and only that key can be used todecrypt it. Custom key for encrypting
  9. 9. Decrypting with Custom KeyOur last string we encrypted was with a set key.Decrypting without the correct key will give us this.Decrypting with the key used for encryption will returnthis.
  10. 10. Review1. Encrypt a file with PVSecurity::encrypt.2. Decrypt a file with PVSecurity::decrypt.3. Custom key have can be added in the options of encrypt and decrypt.4. PVSecurity::init contains the default configuration for encrypting and decrypting data.
  11. 11. API ReferenceFor a better understanding of Validation in ProdigyView, visitthe api by clicking on the link below.PVSecurity More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com

×