function db_decrypt($encoded, $key) {
if (preg_match('/^[A-Z0-9\+\/]*=?$/i', $encoded)) {
$cipher="des3";
$decoded = base64_decode($encoded . '=');
$ivlen = openssl_cipher_iv_length($cipher);
$iv = substr($decoded, 0, $ivlen);
$crypted = str_replace($iv, '', $decoded);
return openssl_decrypt($crypted, $cipher, hash('md5', $key, true), OPENSSL_RAW_DATA, $iv);
} else {
return $encoded;
}
}
// ключ шифрования
$key = 'rave_the_requiem';
//сам хеш из базы
$param = 'x0BjWvkVCUB4591MBbQV9aEpwKhro2b0jvyf299tNpj08HHNTVDLG75rLdgrghS/NRyfZygS4g9PsGNxM5QEby0wFr6BD4fjpOwqXLrOhtZl2BkVpICi2CycEBjSs62F5tOBiYURrE0hlRstWQmTyAGeAQMHGmPnvAZLc2wCZ9KN8NqWI62htbBfY7wwaHdHFqZSM+OfcLlkyeGsA5yxQFedRon4DXmMpiibMr0VBV57dZv5SpWy+ID4A80IXyEfwQLLyDC/HFEca2mf4JggBXn6a8X5t0QeRE0ub74AwAL1MBd5++x5Xk9wZtDFgGmMfNIGdAeghl2yVjRu74s5vPJKZwMrtEeu6H+F4ngMwgA2KUyt/qpSXkCvI7Q1vDqHKb+ieV0Lp34nK4LuDCC705ohv1Dy++PEVaEymEAuis/e77eyzIB3A2IGoXyfGdexbM/jPV9iTaonAV0s4Yo+PN8m51kR4PYYsYpf92k7B2OX1jtb4JDhPrcmI3tCgz/mMtVtFA+i/8PFvSFZi8SHhGAYILONZvg4PX4p+0gZ01aFPlQxbZwewqEY1qHkiEjPrdf6+RyVeIYUAcZMTWgV/9kFeofTem/FcEFU3uBu1jYiX4rfbxWcTYe7oxrtsNa6YMS4PeaTsqck/oigd3HGRBlCutkBnsSWZQE8yHj99SOVwQNI6Y2tPX+eFhQ2x+jAE7GpYQqP0cvDX97NCiBB9U+Ld3ayK79pQv83hovlm5xvnDdqeY6A9NXcYUn8vjKWUJrVoQy8yQBXs4n9K83zc0L3Sx/+2sA21v+m+jIIceWCSjBTm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