39 size_t outlen = base64_encode_alloc (inc, inlen, out);
43 if (outlen == 0 && inlen != 0)
44 (*current_liboctave_error_handler)
45 (
"base64_encode: input array too large");
48 (
"base64_encode: memory allocation error");
61 const char *inc = &(str[0]);
66 bool ok = base64_decode_alloc (inc, str.length (), &out, &outlen);
69 (*current_liboctave_error_handler)
70 (
"base64_decode: input was not valid base64");
72 (*current_liboctave_error_handler)
73 (
"base64_decode: memory allocation error");
76 if ((outlen % (
sizeof (
double) /
sizeof (
char))) != 0)
79 (*current_liboctave_error_handler)
80 (
"base64_decode: incorrect input size");
86 double *dout =
reinterpret_cast<double*
> (out);
87 std::copy (dout, dout + len, retval.
fortran_vec ());