]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/base64.h
o fix : restore a crypted stream on a fd witch doen't define keys cause
[bacula/bacula] / bacula / src / lib / base64.h
index d17f76d16da6d6088bea28c53d61f8ec7b0ff175..17deac9d08f9d91e22bab12ab9d86c5c86d1af90 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -22,4 +22,6 @@
  */
 
 /* Maximum size of len bytes after base64 encoding */
-#define BASE64_SIZE(len) (((len + 3 - (len % 3)) / 3) * 4)
+#define BASE64_SIZE(len) ((4 * len + 2) / 3 + 1)
+
+// #define BASE64_SIZE(len) (((len + 3 - (len % 3)) / 3) * 4)