Question: If I were to encrypt a string of arbitrary length (let's say using md5), is there any relation between increasing string size to the output hash? 

For example, if I were to encrypt a string that was 100 million characters in length, would it be more likely to output a longer hash than an input string of 5 characters?

Elaboration on why would be much appreciated as well, thanks!

Answer: 
Fixed the issue

```
if (digits %2 == 0) 
{
      var mystring = $( "#numBox" ).html();
      mystring = mystring.replace('.','');
      $( "#numBox" ).html(mystring);
      $( "#numBox" ).append(".");
      console.log("worked!");
}

```

Check the updated code on <http://codepen.io/bsley/pen/hrEmK>

Try this

```
$(document).ready(function(){

  var digits = 0; 
  var numBox = document.getElementById('numBox');

    $('.key').click(function(){

        if(this.innerHTML == '0'){
            if (numBox.innerHTML.length > 0)
                numBox.innerHTML = numBox.innerHTML + this.innerHTML;
                digits += 1;
                //console.log("digits");

        }
        else
            // add digits          
            numBox.innerHTML = numBox.innerHTML + this.innerHTML;
            digits += 1;
            //console.log(digits);

        event.stopPropagation();
    });

    $('.btn').click(function(){
        if(this.innerHTML == 'DEL'){
            var numBox = document.getElementById('numBox');
            if(numBox.innerHTML.length > 0){

                // delete a digit
                numBox.innerHTML = numBox.innerHTML.substring(0, numBox.innerHTML.length - 1);
                digits -= 1;
                //console.log(digits);
            }
        }
        else{

            // clear numbox
            document.getElementById('numBox').innerHTML = '';
            digits = 0;
            //console.log(digits);
        }

        event.stopPropagation();
        _checkForDecimals();
    });

    //decimal entry

    $('.key').click(function(){

    _checkForDecimals();

 });

  function _checkForDecimals()
  {
   if (digits > 2) {
      var mystring = $( "#numBox" ).html();
      mystring = mystring.replace('.','');
      var firstPartOfString = mystring.slice(0, mystring.length - 2);
      var secondPartOfString =  mystring.slice( mystring.length - 2,mystring.length);
      //alert(firstPartOfString+'.'+secondPartOfString)
      mystring = firstPartOfString+'.'+secondPartOfString;
      $( "#numBox" ).html(mystring);
      //$( "#numBox" ).append(".");
      console.log("worked!");
    } 
  }

});

```
I checked your fix.But it seems to have an issue.If you press all the keys from 1 to 9, the number becomes 12345678.9. But as per your requirement it should have been 1234567.89 [if I understood correctly].
Please try the below solution and see if it fits your requirement. Please note, at the end of the code block I've added two functions "GetNumberAfterAppendingDecimal" and "GetCleanString" and I've used then on $(.key).click();

```
$('.key').click(function(){
 var inputNumber=GetCleanString($("#numBox").html());

 $("#numBox").html(GetNumberAfterAppendingDecimal(inputNumber));

```

});

```
 function GetNumberAfterAppendingDecimal(str) {
    if (str.length < 3)
        return str;
    var positionFromEnd = 2;
    var reversedStr = str.split('').reverse().join('');
    if (str.length == 3)
        positionFromEnd -= 1;
    reversedStr = [reversedStr.slice(0, positionFromEnd), ".", reversedStr.slice(positionFromEnd)].join('');
    return reversedStr.split('').reverse().join('');
}
function GetCleanString(str) {
str = str.replace(/[\r]+/, '');
str = str.replace(/[\n]+/, '');
str = str.replace(/[\t]+/, '');
str = str.replace('.', '');
str = $.trim(str);
return str;
}

```