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