Home | History | Annotate | Download | only in text

Lines Matching refs:out

70 void base64Encode(const char* data, unsigned len, Vector<char>& out, bool insertLFs)
72 out.clear();
94 out.grow(outLength);
101 out[didx++] = '\n';
104 out[didx++] = base64EncMap[(data[sidx] >> 2) & 077];
105 out[didx++] = base64EncMap[((data[sidx + 1] >> 4) & 017) | ((data[sidx] << 4) & 077)];
106 out[didx++] = base64EncMap[((data[sidx + 2] >> 6) & 003) | ((data[sidx + 1] << 2) & 077)];
107 out[didx++] = base64EncMap[data[sidx + 2] & 077];
114 out[didx++] = '\n';
116 out[didx++] = base64EncMap[(data[sidx] >> 2) & 077];
118 out[didx++] = base64EncMap[((data[sidx + 1] >> 4) & 017) | ((data[sidx] << 4) & 077)];
119 out[didx++] = base64EncMap[(data[sidx + 1] << 2) & 077];
121 out[didx++] = base64EncMap[(data[sidx] << 4) & 077];
125 while (didx < out.size()) {
126 out[didx] = '=';
131 bool base64Decode(const Vector<char>& in, Vector<char>& out, Base64DecodePolicy policy)
133 out.clear();
139 return base64Decode(in.data(), in.size(), out, policy);
143 static inline bool base64DecodeInternal(const T* data, unsigned len, Vector<char>& out, Base64DecodePolicy policy)
145 out.clear();
149 out.grow(len);
160 out[outLength] = base64DecMap[ch];
182 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx + 1] >> 4) & 003));
183 out[didx + 1] = (((out[sidx + 1] << 4) & 255) | ((out[sidx + 2] >> 2) & 017));
184 out[didx + 2] = (((out[sidx + 2] << 6) & 255) | (out[sidx + 3] & 077));
191 out[didx] = (((out[sidx] << 2) & 255) | ((out[sidx + 1] >> 4) & 003));
194 out[didx] = (((out[sidx + 1] << 4) & 255) | ((out[sidx + 2] >> 2) & 017));
196 if (outLength < out.size())
197 out.shrink(outLength);
202 bool base64Decode(const char* data, unsigned len, Vector<char>& out, Base64DecodePolicy policy)
204 return base64DecodeInternal<char>(data, len, out, policy);
207 bool base64Decode(const String& in, Vector<char>& out, Base64DecodePolicy policy)
209 return base64DecodeInternal<UChar>(in.characters(), in.length(), out, policy);