code: public static int getLuhnRemainder (String key)
      {
          int len = key.length();
          int sum = 0;
          for (int multSeq = len % 2, ii=0; ii < len; ii++) {
              int c = key.charAt(ii) - '0';
              if (ii % 2 == multSeq) {
                  c *= 2;
              }
              sum += (c / 10) + (c % 10);
          }
  
          return sum % 10;
      }
docs: Return the luhn remainder for the given key.
  
  @see <a href="http://www.beachnet.com/~hstiles/cardtype.html">
  Instructions for computing the Lunh remainder</a>
  @see <a href="http://www.google.com/search?q=luhn%20credit%20card">
  Find more information with Google</a>