Lines Matching refs:m
46 if (preg_match('/^\$1\$([^\$]{0,8})\$/', $hash, $m)) {
48 $salt = $m[1];
50 } elseif (preg_match('/^\$apr1\$([^\$]{0,8})\$/', $hash, $m)) {
52 $salt = $m[1];
54 } elseif (preg_match('/^\$S\$(.{52})$/', $hash, $m)) {
56 $salt = $m[1];
58 } elseif (preg_match('/^\$P\$(.{31})$/', $hash, $m)) {
60 $salt = $m[1];
62 } elseif (preg_match('/^\$H\$(.{31})$/', $hash, $m)) {
64 $salt = $m[1];
66 } elseif (preg_match('/^pbkdf2_(\w+?)\$(\d+)\$(.{12})\$/', $hash, $m)) {
68 $magic = ['algo' => $m[1], 'iter' => $m[2]];
69 $salt = $m[3];
70 } elseif (preg_match('/^PBKDF2(SHA\d+)\$(\d+)\$([[:xdigit:]]+)\$([[:xdigit:]]+)$/', $hash, $m)) {
72 $magic = ['algo' => $m[1], 'iter' => $m[2]];
73 $salt = $m[3];
74 } elseif (preg_match('/^sha1\$(.{5})\$/', $hash, $m)) {
76 $salt = $m[1];
77 } elseif (preg_match('/^md5\$(.{5})\$/', $hash, $m)) {
79 $salt = $m[1];
80 } elseif (preg_match('/^\$2([abxy])\$(.{2})\$/', $hash, $m)) {
89 } elseif (preg_match('/^:B:(.+?):.{32}$/', $hash, $m)) {
91 $salt = $m[1];
92 } elseif (preg_match('/^\$(5|6)\$(rounds=\d+)?\$?(.+?)\$/', $hash, $m)) {
94 $salt = $m[3];
95 $magic = ['prefix' => $m[1], 'rounds' => $m[2]];
96 } elseif (preg_match('/^\$(argon2id?)/', $hash, $m)) {
97 if (!defined('PASSWORD_' . strtoupper($m[1]))) {
98 throw new \Exception('This PHP installation has no ' . strtoupper($m[1]) . ' support');