65 #include <linux/string.h>
81 extern dbg_info_t *DbgInfo;
114 char *szData = (
char *) Data;
123 for( i = t = *szDest = 0; i < nLen; i++, t++ ) {
124 k = szData[
i] ^ ( bits +
i );
131 szDest[
t] = ((k & 0xFC) >> 2) +
CH_START ;
132 szDest[t+1] = ((k & 0x03) << 4) +
CH_START ;
140 szDest[
t] += (( k & 0xF0 ) >> 4 );
141 szDest[t+1] = (( k & 0x0F ) << 2 ) +
CH_START ;
149 szDest[
t] += (( k & 0xC0 ) >> 6 );
150 szDest[t+1] = ( k & 0x3F ) +
CH_START ;
158 return(
strlen( szDest )) ;
195 for( i = bits = 0 ; i < 12; i++ ) {
200 nLen = (
strlen( szData ) * 3) / 4 ;
202 for( i = t = 0; i < nLen; i++, t++ ) {
206 szDest[
i] = ((( szData[
t]-
CH_START ) & 0x3f ) << 2 ) +
207 ((( szData[t+1]-
CH_START ) & 0x30 ) >> 4 );
212 szDest[
i] = ((( szData[
t]-
CH_START ) & 0x0f ) << 4 ) +
213 ((( szData[t+1]-
CH_START ) & 0x3c ) >> 2 );
218 szDest[
i] = ((( szData[
t]-
CH_START ) & 0x03 ) << 6 ) +
224 szDest[
i] ^= ( bits +
i ) ;