public static function validateBase64($data, callable $filter=null) {
        return base64_encode(base64_decode($data, true)) === $data ?
            self::applyFilter($data, $filter)
            : false;
    }