Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Hash



  I don’t like the Ruby 1.9 hash syntax

There, I said it, I don’t like it. And I don’t know why you do either. I assume you like it anyway, everyone else I talk to seems to. My heart sank over and over again whilst I was at the recent RailsConf and saw respected rubyist after respected rubyist using the new Ruby 1.9 hash syntax in their presentations. I just don’t get it. But I’m not one to just moan. I plan to justify my feelings. Then maybe you can tell me why you do like it? My friend the hash rocket I ...

   Ruby,1.9,Hash,Feature     2011-12-14 07:05:09

  Call of Duty Elite Has Amazing Security

I had tried to register for Elite yesterday, and the servers were being funny, so I wasn't sure if I'd registered. I just now tried to reset my password, and I got the following:Hello JoshForgot your password? These things happen. Access your account with the password below:{Actual Unencrypted Password}Really? They're storing hundreds of thousands of passwords in plain text??EDIT: Not sure what the downvotes are for, surely it's not because huge companies like Steam and Sony never get hacked, an...

   Game,Elite,Call of duty,Defect     2011-11-15 12:42:50

  Arrays.equals() vs MessageDigest.isEqual()

Both Arrays.equals() and MessageDigest.isEqual() are used to compare the equality of two arrays. They can be interchangeably in many cases. However, they do have some differences which lead to different use cases in real applications. One difference is that the arrays passed to MessageDigest.isEqual() cannot be null while it's ok for Arrays.equals(). The one major difference between these two methods is that Arrays.equals() is not time-constant while MessageDigest.isEqual() is time-constant. Thi...

   Arrays.equal(),MessageDigest.isEqual(),Java,Security     2015-05-14 22:03:29

  Why should we drop or reduce use of MD5?

MD5 is a frequently used one-way hash algorithm, it is commonly used in following situations: Check data integrity. We take hash of the data stored in two different places and compare them. If the hash results are the same, then there is no need to check the actual data. This utilizes the collision-resistant feature. Two different data block will have little chance that their hash values will be the same. Many data service providers use such technique to check repeated data to avoild repeating...

   MD5,Vulnerability,attack     2012-09-29 04:47:49

  Supercolliding a PHP array

Did you know that inserting 2^16 = 65536 specially crafted values into a normal PHP array can take 30 seconds? Normally this would take only 0.01 seconds. This is the code to reproduce it: <?php echo '<pre>'; $size = pow(2, 16); // 16 is just an example, could also be 15 or 17 $startTime = microtime(true); $array = array(); for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key += $size) { $array[$key] = 0; } $endTime = microtime(true); echo 'Inserting...

   PHP,Array,hashtable,Slow,Colliding     2011-12-29 09:02:01

  An alternative way to parse URL in JavaScript

Normally when we need to process URL in JavaScript, we may use the location object. Then we can use location.hostname,location.href,location.port etc to get the information we need. In this post, we will parse an URL with an alternative way. We can use an URL to create a DOM object by calling document.createElement("a"). The complete code is: function parseURL(url) { var a = document.createElement('a'); a.href = url; return { source: url, protocol: a.protocol.replace(':',''), host: a.ho...

   URL,location,parse     2014-03-03 07:05:11

  Hash Tables in Javascript

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short ...

   JavaScript,Hashtable,Implementation,Array     2011-11-26 02:43:40

  bcrypt: Safeguarding Passwords with Strong Hashing and Adaptive Security

Introduction In today's digital world, passwords play a crucial role in protecting personal privacy and information security. Passwords are the most commonly used means of authentication because they are simple yet effective. Password security is the cornerstone of cybersecurity and plays a fundamental role in safeguarding the information security of individuals and organizations. However, with the increasing frequency and complexity of cyberattacks, traditional password hashing algorithms like ...

   BCRYPT,SECURITY     2023-11-15 08:14:35

  Useful functions to provide secure PHP application

Security is a very important aspect of programming. There are many functions or modules in any kind of real programming language providing security functionalities  In modern websites, we may often get inputs form users all around the world.There is a famous saying which says that never trust user input. So in web programming languages, we will often see functions which will guarantee the security of the data input from users. Today we will cover some of these functions in the most famous o...

   PHP,security,SQL Injection,XSS,AJAX     2014-10-30 04:21:59

  Content based HTTP Cache

Browsers may cache the webpages we visited, when user types a URL on the address bar, the browser may cache the webpage returned from server while displaying it. If there is no update on the webpage, then next time when the browser requests the same page, it will not download the page again, instead it will load the cached page. If the website explicitly specify that the page is updated, then the browser will download the page again from the server. What's HTTP Cache? You may be familiar with th...

   HTTP Cache,Web crawler     2013-05-24 05:12:59