public static function validate($bban)
    {
        if (!extension_loaded('bcmath')) {
            throw new \RuntimeException(__METHOD__.' needs the bcmath extension.');
        }

        if (mb_strlen($bban) !== 23) {
            return false;
        }
        $key = substr($bban, -2);
        $bank = substr($bban, 0, 5);
        $branch = substr($bban, 5, 5);
        $account = substr($bban, 10, 11);
        $account = strtr(
            $account,
            'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
            '12345678912345678923456789'
        );

        return 97 - bcmod(89 * $bank + 15 * $branch + 3 * $account, 97) === (int) $key;
    }