Cisco WVC210 Reference Manual page 52

Network camera exported cgi commands
Hide thumbs Also See for WVC210:
Table of Contents

Advertisement

Admin-Level CGI Commands
Example: Base-64 Encoder/Decoder Sample Codes
Cisco Small Business Network Camera Exported CGI Commands
int enc1 = 0;
int enc2 = 0;
int enc3 = 0;
int enc4 = 0;
int i = 0, j = 0; //Position counter
do { //Here's the decode loop.
//Grab 4 bytes of encoded content.
enc1 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc2 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc3 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
if(i < strlen(i_buf))
enc4 = (int)(strchr(keyStr, i_buf[i++]) - keyStr);
//Heres the decode part. There's really only one way to do
it.
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
o_buf[j++] = (char)chr1;
if (enc3 != 64) {
o_buf[j++] = (char)chr2;
}
if (enc4 != 64) {
o_buf[j++] = (char)chr3;
}
3
47

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Wvc2300Pvc2300

Table of Contents