Criptografia com PHP

October 18, 2010

Fala Pessoal!

O PHP permite usar criptografia[bb]de 3 formas simples, sendo que em apenas uma delas existe “volta”, ou seja, a descriptografia da string.

1 – base64

Codigica uma string com base64. Para codificar, usa-se o método base64_encode() e para decodificar usa-se base64_decode().

   echo(base64_encode("senha"));
   echo(base64_decode("c2VuaGE="));

2 – MD5

Codifica uma string em um hash hexadecimal de 32 caracteres. Não há método para decodificação.

   echo(md5("senha"));

3 – Crypt

Retorna uma string criptografada usando o algoritmo Unix Standard DES-based. Não há método para decodificação.

   echo(crypt("senha"));

Das três formas, a mais segura[bb]é MD5.

Bom, é isso.

Um abraço!

57 Responses to “Criptografia com PHP”

  1. I appreciate that you put excellent content out that is clear and good-written.

  2. せん。

    個々の死亡証明書を検索するためにインターネッ [url=http://www.1000flames.com/%E3%82%AB%E3%82%B7%E3%82%AA-%E3%83%97%E3%83%AD%E3%83%88%E3%83%AC%E3%83%83%E3%82%AF-c-2.html]カシオ プロトレック 比較[/url] ののいくつかのお金を作ることができるでしょう! あなたがそれ [url=http://www.afjordfotball.com/]ティンバーランド 所ジョージ[/url] を渡すことができます。

    現代世界では、ほとんどの若い女 [url=http://www.blueandwhiteamerica.com/%E3%82%B3%E3%83%BC%E3%83%81%E8%B2%A1%E5%B8%83-c-6.html]コーチ財布 ハート[/url] 運のベスト!。

    そこで、友達を作ることは容易ではあり [url=http://www.dengrow.com/category-8.html]セイコー エクセリーヌ[/url] の将来の生活になることを願っています誰かと対話するときには、 [url=http://www.personaldayspa.com/jp/????????????-?????????????€????/l5.html]シャネル 化粧品|女性用[/url] 。 何であれ、それは有利であるあなたが占星術師を呪うつもりさ、それに向かってあなたのように動作し、それらをあなたがit.

  3. Awesome post. I am a regular visitor of your blog and appreciate you taking the time to maintain the nice site. I’ll be a regular visitor for a really long time.

  4. Awesome post. I’m a normal visitor of your website and appreciate you taking the time to maintain the nice site. I will be a regular visitor for a long time.

  5. Hiya, I’m really glad I’ve found this information. Today bloggers publish only about gossip and net stuff and this is actually annoying. A good site with exciting content, this is what I need. Thank you for making this site, and I’ll be visiting again. Do you do newsletters by email?

  6. Awesome post. I’m a normal visitor of your web site and appreciate you taking the time to maintain the nice site. I’ll be a regular visitor for a really long time.

  7. Marvelous, what a website it is! This website gives valuable data to us, keep it up.|

  8. I just want to tell you that I’m all new to blogging and site-building and certainly enjoyed this page. More than likely I’m going to bookmark your website . You really come with outstanding articles. Bless you for sharing with us your web-site.

  9. Very good post. I definitely love this site. Stick with it!|

  10. How can creative writing be taught in a standardized way?
    comment Pirater un compte Facebook

  11. Thanks very helpful. Will certainly share website with my buddies.|

  12. Quite enlightening look forth to visiting again.|

  13. Do you have any video of that? I’d care to find out more details.|

  14. Thanks for your marvelous posting! I definitely enjoyed reading it, you could be a great author.I will always bookmark your blog and will come back later on. I want to encourage yourself to continue your great posts, have a nice day!|

  15. I enjoy what you guys tend to be up too. This sort of clever work and reporting! Keep up the amazing works guys I’ve incorporated you guys to my personal blogroll.|

  16. you’re in point of fact a good webmaster. The web site loading speed is incredible. It kind of feels that you are doing any distinctive trick. Moreover, The contents are masterpiece. you have performed a wonderful job on this subject!

  17. Thanks , I’ve recently been searching for information about this subject for a long time and yours is the greatest I have found out till now. However, what in regards to the conclusion? Are you positive concerning the source?

  18. Hi, I’m Dot Markland but my better half doesn’t so comprehensive at each and every one. Rhode Island is certainly my your house and I really like every working day living perfect here. Software developing is my profession but nevertheless , soon or perhaps wife and furthermore him will start as well as her own internet business. One of his favorite hobbies is karate but they have been claiming on cutting edge things of late.

  19. I have not checked in here for a while as I thought it was getting boring, but the last several posts are great quality so I guess I will add you back to my daily bloglist. You deserve it my friend :)

  20. Hi, I think your blog might be having browser compatibility issues. When I look at your website in Safari, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, excellent blog!|

  21. Very soon this web site will be famous among all blog viewers, due to it’s pleasant articles or reviews|

  22. I have read some excellent stuff here. Definitely price bookmarking for revisiting. I surprise how much attempt you place to make one of these wonderful informative site.

  23. I want to express my thanks to the writer for bailing me out of this particular setting. As a result of scouting throughout the internet and coming across tricks which were not powerful, I figured my life was gone. Existing without the presence of approaches to the difficulties you have resolved as a result of your main short article is a crucial case, and the ones that could have in a negative way affected my entire career if I hadn’t noticed your website. That competence and kindness in maneuvering all the pieces was tremendous. I don’t know what I would have done if I hadn’t come across such a subject like this. It’s possible to at this moment relish my future. Thanks so much for your expert and amazing guide. I will not hesitate to suggest the website to anybody who would need tips on this subject.

  24. Hiya, I am really glad I have found this information. Today bloggers publish only about gossips and internet and this is really irritating. A good site with exciting content, that’s what I need. Thank you for keeping this web-site, I will be visiting it. Do you do newsletters? Can not find it.

  25. Things i have observed in terms of laptop memory is the fact that there are specifications such as SDRAM, DDR and so on, that must fit the features of the motherboard. If the computer’s motherboard is rather current while there are no os issues, replacing the ram literally takes under one hour. It’s one of the easiest laptop upgrade types of procedures one can think about. Thanks for spreading your ideas.

  26. Hello, ciekawy wpis. Określony czas nie pisałem tak ciekawego dzieła

  27. Hello to every single one, it’s in fact a nice for me to pay a quick visit this site, it consists of priceless Information.|

  28. I would like to thnkx for the efforts you have put in writing this site. I’m hoping the same high-grade blog post from you in the upcoming also. In fact your creative writing abilities has encouraged me to get my own website now. Really the blogging is spreading its wings fast. Your write up is a good example of it.

  29. Pretty nice post. I just stumbled upon your weblog and wanted to say that I’ve really enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again soon!

  30. It¡¦s in reality a great and helpful piece of info. I¡¦m glad that you simply shared this helpful information with us. Please stay us informed like this. Thanks for sharing.

  31. My wife and i felt very fulfilled when Albert could finish up his web research through the entire ideas he got from your very own blog. It is now and again perplexing just to continually be giving freely tricks that many men and women may have been making money from. We consider we now have the writer to give thanks to for that. The most important explanations you made, the simple site menu, the relationships you will make it possible to create – it’s mostly extraordinary, and it’s really assisting our son in addition to the family reason why this idea is brilliant, which is extremely mandatory. Thanks for the whole thing!

  32. I simply desired to thank you very much yet again. I do not know the things that I could possibly have followed in the absence of the actual strategies revealed by you over my area. It seemed to be a difficult difficulty for me personally, nevertheless being able to see the well-written technique you resolved that forced me to cry with happiness. Now i’m happy for your advice and in addition expect you really know what an amazing job you happen to be carrying out teaching some other people using a blog. Most likely you haven’t encountered all of us.

  33. Thanks for sharing excellent informations. Your web-site is so cool. I’m impressed by the details that you have on this blog. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my pal, ROCK! I found simply the info I already searched everywhere and just could not come across. What an ideal website.

  34. Wow, amazing blog format! How long have you been blogging for? you made blogging glance easy. The overall glance of your site is great, as well as the content!

  35. Thanks for the a new challenge you have exposed in your short article. One thing I’d really like to reply to is that FSBO associations are built eventually. By presenting yourself to the owners the first saturday their FSBO will be announced, prior to the masses start out calling on Mon, you make a good interconnection. By giving them instruments, educational elements, free records, and forms, you become a good ally. If you take a personal curiosity about them and their situation, you produce a solid network that, many times, pays off when the owners decide to go with a real estate agent they know along with trust – preferably you actually.

  36. Greetings! Very useful advice within this post! It is the little changes that will make the most significant changes. Thanks for sharing!|

  37. Great article and right to the point. I am not sure if this is really the best place to ask but do you guys have any ideea where to get some professional writers? Thx :)

  38. Paragraph writing is also a excitement, if you be acquainted with afterward you can write if not it is difficult to write.|

  39. Hiya, I’m really glad I have found this information. Today bloggers publish just about gossips and web and this is really annoying. A good blog with exciting content, that is what I need. Thank you for keeping this web-site, I’ll be visiting it. Do you do newsletters? Cant find it.

  40. obviously like your website but you need to test the spelling on several of your posts. Several of them are rife with spelling issues and I find it very troublesome to inform the truth however I¡¦ll certainly come back again.

  41. I am always searching online for ideas that can benefit me. Thx!

  42. Great tremendous things here. I am very glad to peer your article. Thanks a lot and i am looking forward to touch you. Will you please drop me a e-mail?

  43. Great blog here! Additionally your site loads up very fast! What host are you the use of? Can I am getting your affiliate hyperlink for your host? I want my site loaded up as quickly as yours lol

  44. Really enjoyed this article, can you make it so I receive an email sent to me when there is a fresh article?

  45. my blog is a link on my web home page and I would like it to show the posts from the blog? Any ideas?

  46. Its not my first time to pay a quick visit this site, i am browsing this web page dailly and obtain good information from here every day.

  47. I thіn this is among the most vital information fߋr me.
    And i am glad reading your article. But wanna remark on few general things, Thhe site stylle is ideal, the articles is really nice :
    D. Good job, cheеrs

    Allso visit my page Josefina

  48. Howdy, i read your blog occasionally and i own a similar one and i was just curious if you get a lot of spam remarks? If so how do you prevent it, any plugin or anything you can advise? I get so much lately it’s driving me crazy so any help is very much appreciated.

  49. Undeniably believe that which you stated. Your favorite reason appeared to be on the net the easiest thing to be aware of. I say to you, I certainly get annoyed while people think about worries that they plainly don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

  50. buy wines online

  51. Payday loans

  52. I enjoy looking through an article that will make people
    think. Also, many thanks for allowing me to comment!

  53. For information on what this means please click here.

  54. This centers any text or graphics you add to the cell.

  55. The hack works fantastic with multi platform gadgets and does not want require
    to obtain or completing any surveys.

  56. Roblox may be played in your private pc, Android machine, iPhone, or iPad, so we developed this Roblox hack instrument that works for all three platforms (PC, Android, or Mac or iOS), making it accessible to all players.

  57. Very quickly this website will be famous among all blogging
    and site-building users, due to it’s good articles or
    reviews

Leave a Reply