PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/MD5/php/md5.php

http://marcoratto.googlecode.com/
PHP | 34 lines | 10 code | 4 blank | 20 comment | 2 complexity | d7716d684a065ba906bf52b48d8ff061 MD5 | raw file
Possible License(s): GPL-2.0
  1. #!/usr/bin/env php
  2. <?PHP
  3. /*
  4. * Copyright (C) 2009 Marco Ratto
  5. *
  6. * This file is part of the project MD5.
  7. *
  8. * MD5 is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * any later version.
  12. *
  13. * MD5 is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with MD5; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. $SYNTAX = "Parameter: <string>\n";
  23. if ($argc != 2) {
  24. print $SYNTAX;
  25. exit(1);
  26. }
  27. $s = $argv[1];
  28. echo md5($s) . "\n";
  29. exit(0);
  30. ?>