27 | Hashing Using PHP for Beginners | 2023 | Learn PHP Full Course For Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • In this PHP tutorial I will teach you about hashing using PHP, in order to make your data more secure, and harder to gain access to. 🙂 We have two common ways to do hashing. One is to hash general data, and the other is when hashing passwords. I will show both in this tutorial here.
    ➤ LINKS
    The code for the last example: • 22 | INSERT INTO Datab...
    ➤ TIMESTAMPS
    00:00:00 - What is hashing?
    00:02:51 - What is a salt?
    00:03:18 - How to do general hashing
    00:11:34 - How to hash passwords
    00:19:01 - Password hash example!
    ➤ GET ACCESS TO MY LESSON MATERIAL HERE!
    First of all, thank you for all the support you have given me!
    I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
    I am now using Patreon and TH-cam Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
    I hope you will find it helpful :)
    Memberships: / @dani_krossing
    Patreon: / mmtuts

ความคิดเห็น • 44

  • @akashgola2153
    @akashgola2153 4 หลายเดือนก่อน +6

    A bit confusing in start but crystal clear in the end. Thanks for the amazing lecture.

  • @SnakesRaven
    @SnakesRaven ปีที่แล้ว +21

    I'm really glad you're talking about safety as well. Usually this gets skipped alot in tutorials.

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +9

      In my last playlist from many years ago, I also skipped a lot of security. There can quickly become too much focus on the language itself, on not on all the “extra”. Which is too bad since the “extra” is equally important. 🙂 it’s also part of the reason I am recreating this course. 😊

    • @wasimalwisi
      @wasimalwisi ปีที่แล้ว +1

      me to

    • @akashgola2153
      @akashgola2153 4 หลายเดือนก่อน +1

      @@Dani_Krossing We r glad u did that.

  • @octadp5728
    @octadp5728 หลายเดือนก่อน

    Excellent Course! Greetings from Argentina

  • @thabimalepe8156
    @thabimalepe8156 ปีที่แล้ว +5

    Thank you for providing quality content which is straight forward and easy to follow, love from South Africa

  • @TaroWalnut
    @TaroWalnut 21 วันที่ผ่านมา

    Thank you for this! Really helped me a lot!!!

  • @legendofgaming8481
    @legendofgaming8481 ปีที่แล้ว +4

    Great video, I love the fact when I started programming I used your videos as a reference since they are so straightforward and to the point.

  • @leefelix6469
    @leefelix6469 หลายเดือนก่อน

    A VERY BIG MASSIVE ENORMOUS THANKSSSSSSS

  • @mcmehdi8782
    @mcmehdi8782 2 หลายเดือนก่อน

    ty

  • @RAHAT_PY
    @RAHAT_PY ปีที่แล้ว +3

    great one

  • @user-jj2tg9rm8z
    @user-jj2tg9rm8z 7 หลายเดือนก่อน +3

    super helpful thankyou

  • @jediampm
    @jediampm ปีที่แล้ว +2

    Hi, thanks for the video.
    few things:
    - hash is one way encryption algorithm, any kind custom hash like you show or buit-in should not use for data sensitive data like email, name, etc because you will need to show that info in the web pages. in other hand password you never show in web pages or any places, as such hash make sense and php, as you show, has buit-in function for that.
    - for sensitive data such name, address, email, etc, where for example in Europe is required to be secure, you use an two encryption algorithm, because you need "decripted" show this info in web pages, i think for this is best use database for that instead of PHP, in case of switching of language.
    - i didnt see video about signUp, however, instead of using "bindParam" methode, you can create an assoc array and put as param into "execute" method

  • @AxxionMarketPlace-iu6ri
    @AxxionMarketPlace-iu6ri 11 หลายเดือนก่อน +1

    Thank you

  • @Izkawi33
    @Izkawi33 ปีที่แล้ว +1

    I can't wait for next videos pls upload next lessons

  • @HaiderAli-zo9ff
    @HaiderAli-zo9ff ปีที่แล้ว +3

    ❤❤

  • @yanarandrianandrasana8279
    @yanarandrianandrasana8279 ปีที่แล้ว +3

    Hi, from Madagascar

  • @iohn8688
    @iohn8688 ปีที่แล้ว

    This course is really helpful, usually you gotta pay for this type of thing. I would like to ask tho will you cover topics for form validation, checking the email is valid and password strength etc?

  • @WasifAnton
    @WasifAnton ปีที่แล้ว

    I really like your videos, I would like to suggest , show us how to make Login with google :)

  • @zancrow_gaming
    @zancrow_gaming 8 หลายเดือนก่อน

    Your videos are so simple. I recently just finished a full basic course on PHP. But i didnt get the logic compared to the Nodejs i write. Because it didnt feel industry material. But watched few of your videos on sessions, my sql and i know i can no build an actual secure crud app with php.

  • @gamarcano2007
    @gamarcano2007 5 หลายเดือนก่อน

    Hey Dani great video!! Just to clarify one thing, the first parameter on function "password_verify" is unencrypted and the second encrypted. So I understand that the function encrypts the first parameter before comparing. ¿is it right?

  •  2 หลายเดือนก่อน

    #AllEyesOnIOKandRafah

  • @Paul.Reviews
    @Paul.Reviews 6 หลายเดือนก่อน

    Just to clarify, salts don't make passwords stronger as such. They're a method of making a deterministic process random; two identical inputs won't equal the same output.
    Also, don't use === to compare hashes. You need a time sensitive comparison. Use hash equal.

  • @elikimlin5612
    @elikimlin5612 6 หลายเดือนก่อน +1

    Hi Dani, loving the videos! I feel so much more confident with php/rDBMS now!
    Question regarding one of the last comments you made about using hashing to protect any sensitive data stored on the database: obviously passwords fit in this category, but would things like a person's address/phone number/date of birth also fall under this sensitive data that would need to be hashed due to the personal nature of the information? Or would this cause too much of a strain on the database/be a pain for the developers?
    Thanks for the help and hope your 2024 treats you will :D

    • @Dani_Krossing
      @Dani_Krossing  6 หลายเดือนก่อน +2

      Passwords are important to hash every time. 🙂
      Emails are usually not hashed, since we store them for a reason, so we can send mails to our users. But they should still be treated with care, since we don't want users to be able to see other users emails.
      We do also use tokens to improve security, to verify the user is the actual user, who is making changes to their account/database column, and those tokens need to be hashed too.
      And then we have information like credit cards, social security numbers, or other sensitive information that you wouldn't even share with other people IRL, and those need to be encrypted (not hashed) in most cases.
      Hope this helped. 🙂

    • @bilalbeny4172
      @bilalbeny4172 6 หลายเดือนก่อน

      what is difference between hash and encryption?
      @@Dani_Krossing

  • @Izkawi33
    @Izkawi33 ปีที่แล้ว +1

    thank you Mr Dani What is te difference between PASSWORD_BYCRPT and PASSWORD_DEFAULT and which one should I use??

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +1

      Like mentioned in the video, PASSWORD_DEFAULT uses PASSWORD_BCRYPT as its default atm. 🙂 The difference is that DEFAULT might change in the future, depending on what the creators of PHP think it should be, where as BCRYPT will give us more control.

  • @user-td4pf6rr2t
    @user-td4pf6rr2t 7 หลายเดือนก่อน

    lines 8 and 20 are the same?

  • @SmirkStation0
    @SmirkStation0 ปีที่แล้ว +2

    Please are you going to do a login and signup system in the future videos

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +3

      I was planning on the next video being a login and signup system, using everything we have learned up until now 🙂

  • @tylerwalton7659
    @tylerwalton7659 5 หลายเดือนก่อน +1

    Please tell me you will still be making videos about code! Idc which code it is. I feel like you are too good to give this up.

    • @Dani_Krossing
      @Dani_Krossing  5 หลายเดือนก่อน +1

      Ty 😊 I’m trying to find time

    • @tylerwalton7659
      @tylerwalton7659 5 หลายเดือนก่อน +1

      @@Dani_Krossing good to know you are staying busy! I’m a first year developer using PHP and Laravel at work. I’m self taught so I have a lot of gaps in my knowledge. But I just wanted to let you know your videos have been incredible for me since I came across you recently. Thank for all you have put out so far!

  • @Trunk_Tech
    @Trunk_Tech 10 หลายเดือนก่อน +1

    Dani what if I export the data in excel sheet will it still have the hashing.

    • @Dani_Krossing
      @Dani_Krossing  10 หลายเดือนก่อน +1

      Yes. Hashing isn’t supposed to be known by anyone, except the person who submitted the data.
      So if for example you have a password field, then even you as the owner of the website, shouldn’t be allowed to just print out all your users passwords. This could lead to A LOT of trouble, since you would be sharing extremely sensitive information. Even if it “just printed out”. 🙂

    • @Trunk_Tech
      @Trunk_Tech 10 หลายเดือนก่อน +2

      Thank you soo much master 😊💯

  • @dal968
    @dal968 7 หลายเดือนก่อน

    Is not easier to use an captcha instead of increasing the complexity of password?

    • @Dani_Krossing
      @Dani_Krossing  7 หลายเดือนก่อน

      Captcha is a good addition, but you still need to keep passwords complex and secure.

  • @sholahuddinihsan6391
    @sholahuddinihsan6391 4 หลายเดือนก่อน

    somehow you look like Elon Musk

  • @hiamblax
    @hiamblax ปีที่แล้ว +3

    @hiamblax from Zambia

    • @hiamblax
      @hiamblax ปีที่แล้ว +1

      You really help me with your videos❤