A virtual teacher who reveals to you the great secrets of Base64

Comments (12)

I hope you enjoy this discussion. In any case, I ask you to join it.

  • Daniel,
    Tnx, working on angular
  • brenno,
    convert base64 to file, show me code. :)
  • A-Games,
    what about converting files?
    do you get the text from the file then encode that?????????
    • NickS-KC,
      If in Angular 8-12 (and possibly earlier versions as well, I write mostly NG v8-v10 --- the function for encoding and decoding would be btoa() and atob() however, I've seen a message when I tried using in a recent v11 project that angular deprecated btoa() and atob() in future versions. you'll have to solve for your string and then encode and then on the receiving end you'll decode to string and render it using any means you wish i.e. using map or subscribe perhaps or just run a console.log function like

      <!-- language: lang-js -->
          console.log(btoa("password")); // cGFzc3dvcmQ=
      <!-- end snippet -->

      and for Angular 12+ something like this is what's been suggested around. using

      console.log(Buffer.from("Hello World").toString('base64'));  // SGVsbG8gV29ybGQ=
      console.log(Buffer.from("SGVsbG8gV29ybGQ=", 'base64').toString('binary'))   // Hello World
  • nqhXncMU,
  • nqhXncMU,
  • nqhXncMU,
    -1' OR 2+132-132-1=0+0+0+1 or 'CDfxK862'='
  • nqhXncMU,
    -1; waitfor delay '0:0:15' --
  • nqhXncMU,
    -1" OR 3+283-283-1=0+0+0+1 --
  • nqhXncMU,
    -1 OR 2+442-442-1=0+0+0+1
  • nqhXncMU,
    1 waitfor delay '0:0:15' --
  • ncMUFCMU,
    -5) OR 174=(SELECT 174 FROM PG_SLEEP(15))--
Add new comment

If you have any questions, remarks, need help, or just like this page, please feel free to let me know by leaving a comment using the form bellow.
I will be happy to read every comment and, if necessary, I will do my best to respond as quickly as possible. Of course, spammers are welcome only as readers.