1--TEST--
2Test Blowfish crypt() with invalid rounds
3--SKIPIF--
4<?php
5if (!function_exists('crypt') || !defined("CRYPT_BLOWFISH")) {
6    die("SKIP crypt()-blowfish is not available");
7}
8?>
9--FILE--
10<?php
11
12$salts = array('32' => '$2a$32$CCCCCCCCCCCCCCCCCCCCCC$',
13               '33' => '$2a$33$CCCCCCCCCCCCCCCCCCCCCC$',
14               '34' => '$2a$34$CCCCCCCCCCCCCCCCCCCCCC$',
15               '35' => '$2a$35$CCCCCCCCCCCCCCCCCCCCCC$',
16               '36' => '$2a$36$CCCCCCCCCCCCCCCCCCCCCC$',
17               '37' => '$2a$37$CCCCCCCCCCCCCCCCCCCCCC$',
18               '38' => '$2a$38$CCCCCCCCCCCCCCCCCCCCCC$',);
19
20foreach($salts as $i=>$salt) {
21  $crypt = crypt('U*U', $salt);
22  if ($crypt === '*0' || $crypt === '*1') {
23    echo "$i. OK\n";
24  } else {
25    echo "$i. Not OK\n";
26  }
27}
28
29?>
30--EXPECT--
3132. OK
3233. OK
3334. OK
3435. OK
3536. OK
3637. OK
3738. OK
38