Base64 Encoding/Decoding explained

Поділитися
Вставка
  • Опубліковано 3 лип 2021
  • $200 DigitalOcean hosting coupon: m.do.co/c/dba93b1bbe11
    Discord: / discord
    Like my videos and tutorials? Consider donating: www.paypal.me/pentacode
    Repo: github.com/yongzhihuang/Penta...
    FOLLOW US:
    Twitter: / pentacodevids
    Facebook: / pentacode
    Don't forget to subscribe! Really appreciate it!
    Best Shared hosting: www.bluehost.com/track/pentaco...
    ES6 for Everyone - The best way to learn modern ES6 JavaScript ES6.io/friend/YONGZHI
    Sublime Text Power User Book SublimeTextBook.com/friend/YO...
    React For Beginners ReactForBeginners.com/friend/...
    Learn Node LearnNode.com/friend/YONGZHI
    Learn Redux LearnRedux.com/friend/YONGZHI
    Javascript in 30 lessons JavaScript30.com/friend/YONGZHI
    Learn Flexbox: Flexbox.io/friend/YONGZHI
    Learn CSS Grid: CSSGrid.io/friend/YONGZHI
    I Found an Answer by Twin Musicom is licensed under a Creative Commons Attribution license (creativecommons.org/licenses/...)
    Artist: www.twinmusicom.org/
    Music: Mura Masa - Lotus Eater (Tonton Remix) by Underground Charisma

КОМЕНТАРІ • 30

  • @mdshadab3470
    @mdshadab3470 2 роки тому +6

    For the past 5 hrs I've been searching for I dont know what but your video solved my problem, you are god's angel bro 😭😂

  • @dexmake
    @dexmake Рік тому +5

    I got what i wanted from minute 5 but i watch the whole thing just for the good way of explaining the subject. Thank you very much my man.

  • @bence4198
    @bence4198 Рік тому

    You are a genius, I've been sucking with this about 2 days ago, and ur video brightened my mind THANKS!

  • @Colstonewall
    @Colstonewall 3 роки тому +4

    Very nice, thank you!

  • @ashtonmiller8682
    @ashtonmiller8682 2 роки тому +1

    I have something I need decoded that's in base 64. I'm just learning, but it's important!

  • @shivkarj1456
    @shivkarj1456 2 роки тому +1

    Nice explanation!

  • @engftz306
    @engftz306 Рік тому

    very well explanation. Thank you

  • @gustavstreicher4867
    @gustavstreicher4867 Рік тому +2

    "new Buffer" has been depricated since Node v6. Just use this:
    const newEncoded = Buffer
    .from(input[, initialEncoding])
    .toString(newEncoding);
    Also, the "=" at the end is important if you need to concatenate base64 strings.
    The use of "=" in the binary format doesn't make sense. It has to be padded with zeros "0". Your map of "1111=" to 60 proves this as it is actuall a map of "111100" to 60.
    Fun fact:
    Base64 encoding is a secondary kind of encoding relative to ASCII, since you pad (first with zeros, then with "=" symbols) to get base64, but to go back you need to trim (first trimming "=" then trimming zeros). You can't reverse their roles in this regard since the base64 character set is a subset of the ASCII character set.

  • @gautam_nath
    @gautam_nath Рік тому

    Absolutely Amazing

  • @Mohan-jd6ck
    @Mohan-jd6ck 2 роки тому +3

    Great content .
    Correct me if i'm wrong,
    @3:45 , Is that a base64 table , instead of ASCII Table

  • @negardeylami6039
    @negardeylami6039 Рік тому

    Thank you totally got it

  • @quinojuan2
    @quinojuan2 Рік тому

    Sublime. Thanks

  • @terencejoker149
    @terencejoker149 2 роки тому +1

    nice job

  • @senthamarai_kannan.
    @senthamarai_kannan. 2 роки тому

    how to do this in angular typescript

  • @imtechnophile
    @imtechnophile 2 роки тому +1

    Can I use it for html

  • @philbutthead
    @philbutthead Рік тому

    What if there is a space between the words? like- "Hello There"
    I tried it but it is wrong starting the second word, so I am guessing the space has something to do with it? Yelp!

  • @ramabookstroremalang9131
    @ramabookstroremalang9131 2 роки тому

    does a frontend dev convert image to base64 and the backend guy save it as string using LOB?

    • @Pentacode
      @Pentacode  Рік тому

      In some databases they do that, since it's a text string, it's easy to represent.

  • @ravendfj
    @ravendfj 2 роки тому

    Thanks a lot for the explication. Can you please tell me why you have to make groups of 6 bits?

    • @VioletMould
      @VioletMould 2 роки тому +2

      he explains early on that base64 only allows for encoding at 6-bits

    • @weekipi5813
      @weekipi5813 Рік тому

      because with 6 bits you can have a total of 64 combinations: 2 to the 6th power is equal to 64. Namely if you use 6 bits you can generate 64 different combinations. You can use those combinations as indexes into a predefined table of symbols and there you have it.

  • @amitmalhotra4706
    @amitmalhotra4706 Рік тому

    something is not adding here - 1111 cannot be 60 in decimal 2^3 + 2^2 + 2^1 + 2^0 = 8 + 4 + 2 + 1 = 15

    • @amitmalhotra4706
      @amitmalhotra4706 Рік тому

      Okay got it! basically, the last one has been converted to 111100 (two newly added 00).

  • @krishnachaitanya4822
    @krishnachaitanya4822 2 роки тому +1

    What's the name of that VSCode theme?

    • @Nimplex
      @Nimplex 2 роки тому +1

      One Monokai

  • @T55sArt
    @T55sArt Рік тому

    great for optimizing/taking advantage of funtions in the language, not so much for the actual learning :/

  • @MagicJF
    @MagicJF 2 роки тому +1

    😄

  • @jolllyroger1
    @jolllyroger1 Рік тому

    And another one that skips the binary etc
    Why because you do not know it