]> 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 ae3318243798ef2dcbee4d9cc420bcc9fba5aa1f..17deac9d08f9d91e22bab12ab9d86c5c86d1af90 100644 (file)
@@ -7,24 +7,21 @@
  */
 
 /*
-   Copyright (C) 2000-2005 Kern Sibbald and John Walker
+   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 as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
 /* 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)