资源简介
haproxy-1.6.2.tar 留着备用
代码片段和文件信息
/*
* base64rev generator
*
* Copyright 2009-2010 Krzysztof Piotr Oledzki
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License or (at your option) any later version.
*
*/
#include
const char base64tab[65]=“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/“;
char base64rev[128];
#define base ‘#‘ /* arbitrary chosen base value */
#define B64MAX 64
#define B64PADV B64MAX
int main() {
char *p c;
int i min = 255 max = 0;
for (i = 0; i < sizeof(base64rev); i++)
base64rev[i] = base;
for (i = 0; i < B64MAX; i++) {
c = base64tab[i];
if (min > c)
min = c;
if (max < c)
max = c;
}
for (i = 0; i < B64MAX; i++) {
c = base64tab[i];
if (base+i+1 > 127) {
printf(“Wrong base value @%d\n“ i);
return 1;
}
base64rev[c - min] = base+i+1;
}
base64rev[‘=‘ - min] = base + B64PADV;
base64rev[max - min + 1] = ‘\0‘;
printf(“#define B64base ‘%c‘\n“ base);
printf(“#define B64CMIN ‘%c‘\n“ min);
printf(“#define B64CMAX ‘%c‘\n“ max);
printf(“#define B64PADV %u\n“ B64PADV);
p = base64rev;
printf(“const char base64rev[]=\““);
for (p = base64rev; *p; p++) {
if (*p == ‘\\‘)
printf(“\\%c“ *p);
else
printf(“%c“ *p);
}
printf(“\“\n“);
return 0;
}
- 上一篇:编译原理课后习题答案清华大学
- 下一篇:易观:2018年中国人工智能应用市场专题分析
相关资源
- haproxy-1.7.8稳定绿色版.rar
- Windows支持SSL的Haproxy 1.8.17
- Haproxy+Keepalived高可用环境部署梳理主
- Haproxy安装脚本
- haproxy1.63_win32/64 windows程序包
- HAProxy1.6.3 for Windows 64位含配置文件
- haproxy-1.6.3
- haproxy-1.7.8.tar.gz
- haproxy-1.8.14 windows 最新稳定版本
- Windows Haproxy-2.0.2--20190725.rarWindows Hap
- RabbitMq+Haproxy
- Haproxy+Mycat集群搭建指南
评论
共有 条评论