|
|
|
|
|
|
|
|
BadConversion = false; // If we get here we've done good. |
|
|
BadConversion = false; // If we get here we've done good. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
to_base64::to_base64(const vector<unsigned char>& bfr) : // Converts from a base64buffer. |
|
|
|
|
|
|
|
|
to_base64::to_base64(const std::vector<unsigned char>& bfr) : // Converts from a base64buffer. |
|
|
BadConversion(true) { // No conversion yet ;-) |
|
|
BadConversion(true) { // No conversion yet ;-) |
|
|
convert(&bfr[0], bfr.size()); // Recast the pointer and do it. |
|
|
convert(&bfr[0], bfr.size()); // Recast the pointer and do it. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
to_base64::to_base64(const vector<char>& bfr) : // Converts from a base64codec buffer. |
|
|
|
|
|
|
|
|
to_base64::to_base64(const std::vector<char>& bfr) : // Converts from a base64codec buffer. |
|
|
BadConversion(true) { // No conversion yet ;-) |
|
|
BadConversion(true) { // No conversion yet ;-) |
|
|
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // Do this to get it done. |
|
|
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // Do this to get it done. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
BadConversion = false; // If we get here we did ok. |
|
|
BadConversion = false; // If we get here we did ok. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
from_base64::from_base64(const vector<unsigned char>& bfr) : // Converts from a base64buffer. |
|
|
|
|
|
|
|
|
from_base64::from_base64(const std::vector<unsigned char>& bfr) : // Converts from a base64buffer. |
|
|
BadConversion(true) { // It's bad until we've done it. |
|
|
BadConversion(true) { // It's bad until we've done it. |
|
|
convert(&bfr[0], bfr.size()); // Recast the pointer and do it. |
|
|
convert(&bfr[0], bfr.size()); // Recast the pointer and do it. |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
from_base64::from_base64(const vector<char>& bfr) : // Converts from a buffer. |
|
|
|
|
|
|
|
|
from_base64::from_base64(const std::vector<char>& bfr) : // Converts from a buffer. |
|
|
BadConversion(true) { // It's bad until we've done it. |
|
|
BadConversion(true) { // It's bad until we've done it. |
|
|
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // This is how we do it. |
|
|
convert(reinterpret_cast<const unsigned char*>(&bfr[0]), bfr.size()); // This is how we do it. |
|
|
} |
|
|
} |