Constant one-time pad



  •  /**

    • the one-time pad we use to encrpt against (dont ask)
      */
      public static final String AUTH_CODE = "...";

    I found this gem while porting some security code.  Notice:

    • It's referred to as a "One-Time" pad
    • It's final


  • @durnurd said:

    I found this gem while porting some security code.  Notice:

    I wonder how good the "security" is, then.

    Reminds me of:

    <font size="2" face="verdana, arial, helvetica, sans-serif">int getRandomNumber()

    {

        return 4; //chosen by fair dice roll

                  //guaranteed to be random.

    }</font>



  •  Aww come on, it's a one time pad, the programmer only wrote it out once. :D



  •  I'm taking the "(don't ask)" as a sign that the developer knew he was coding a WTF when he did it, but was bacekd into a corner by sombody else's bad decision.  That's more funny, but less shameful.



  •  In the same code, I found this comment, which isn't so much of a WTF,but I don't think he knew he got his saying backwards:

     

    //There is an implict limit of 2^31 outgoing
    //packets in this setup but we'll come to that bridge when we cross it.



  •  That made me laugh out loud :D I like it.



  • @durnurd said:

     In the same code, I found this comment, which isn't so much of a WTF,but I don't think he knew he got his saying backwards:

     

    //There is an implict limit of 2^31 outgoing
    //packets in this setup but we'll come to that bridge when we cross it.

    That must've been coded by either Yoda or Yakov Smirnoff.



  • @danixdefcon5 said:

    That must've been coded by either Yoda or Yakov Smirnoff.
     

    And that gives me a great idea for the next Star Wars prequel/buddy movie.

     "In Galactic Empire, command you, the droids do."

     



  • @danixdefcon5 said:

    @durnurd said:

    I found this gem while porting some security code.  Notice:

    I wonder how good the "security" is, then.

    Reminds me of:

    <font size="2" face="verdana, arial, helvetica, sans-serif">int getRandomNumber()

    {

        return 4; //chosen by fair dice roll

                  //guaranteed to be random.

    }</font>


    Did he roll only one d20 or did he roll 4d20, caz thats a bit more random ya know!



  • @astonerbum said:

    @danixdefcon5 said:
    @xkcd said:
    <font face="verdana, arial, helvetica, sans-serif" size="2">int getRandomNumber()

    {

        return 4; //chosen by fair dice roll

                  //guaranteed to be random.

    }</font>


    Did he roll only one d20 or did he roll 4d20, caz thats a bit more random ya know!

    Knowing Randal, he probably rolled at least a d100 - cuz he's thorough, like that.



  •  Depending on the system, he may have had to roll either a d65536 or possibly d4294967296


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.