26static const char b64[] =
27"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
30 int max_len,
int *out_len)
34 int bytes = (in_len*8 + 5)/6, pad_bytes = (
bytes % 4) ? 4 - (
bytes % 4) : 0;
36 TRACE(
"bytes is %d, pad bytes is %d\n",
bytes, pad_bytes);
37 *out_len =
bytes + pad_bytes;
39 if(
bytes + pad_bytes + 1 > max_len)
49 out_buf[
i + 0] =
b64[ (
d[0] >> 2) & 0x3f ];
52 out_buf[
i + 1] =
b64[ ((
d[0] << 4) & 0x30) | (
d[1] >> 4 & 0x0f)];
55 out_buf[
i + 2] =
b64[ ((
d[1] << 2) & 0x3c) | (
d[2] >> 6 & 0x03)];
57 out_buf[
i + 3] =
b64[
d[2] & 0x3f];
67 out_buf[
i + 0] =
b64[ (
d[0] >> 2) & 0x3f ];
70 out_buf[
i + 1] =
b64[ ((
d[0] << 4) & 0x30) | (
d[1] >> 4 & 0x0f)];
73 out_buf[
i + 2] =
b64[ ((
d[1] << 2) & 0x3c) ];
80 out_buf[
i + 0] =
b64[ (
d[0] >> 2) & 0x3f ];
83 out_buf[
i + 1] =
b64[ ((
d[0] << 4) & 0x30)];
99 if(
c >=
'A' &&
c <=
'Z')
101 if(
c >=
'a' &&
c <=
'z')
103 if(
c >=
'0' &&
c <=
'9')
114 int max_len,
int *out_len)
118 int ip0, ip1, ip2, ip3;
120 TRACE(
"in_len: %d\n", in_len);
122 if((in_len % 4) != 0)
140 out_buf[
i + 0] = (ip0 << 2) | (ip1 >> 4);
141 out_buf[
i + 1] = (ip1 << 4) | (ip2 >> 2);
142 out_buf[
i + 2] = (ip2 << 6) | ip3;
155 out_buf[
i] = (ip0 << 2) | (ip1 >> 4);
167 out_buf[
i + 0] = (ip0 << 2) | (ip1 >> 4);
168 out_buf[
i + 1] = (ip1 << 4) | (ip2 >> 2);
183 out_buf[
i + 0] = (ip0 << 2) | (ip1 >> 4);
184 out_buf[
i + 1] = (ip1 << 4) | (ip2 >> 2);
185 out_buf[
i + 2] = (ip2 << 6) | ip3;
_STLP_VENDOR_CSTD::ldiv_t div(long __x, long __y)
static unsigned char bytes[4]
SECURITY_STATUS decodeBase64(char *in_buf, int in_len, PBYTE out_buf, int max_len, int *out_len)
static BYTE decode(char c)
SECURITY_STATUS encodeBase64(PBYTE in_buf, int in_len, char *out_buf, int max_len, int *out_len)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define SEC_E_BUFFER_TOO_SMALL
#define SEC_E_INVALID_TOKEN