~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to extra/yassl/taocrypt/src/coding.cpp

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
   Copyright (C) 2000-2007 MySQL AB
 
2
   Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
3
3
 
4
4
   This program is free software; you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
11
11
   GNU General Public License for more details.
12
12
 
13
13
   You should have received a copy of the GNU General Public License
14
 
   along with this program; see the file COPYING. If not, write to the
15
 
   Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
16
 
   MA  02110-1301  USA.
 
14
   along with this program; if not, write to the Free Software
 
15
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
17
16
*/
18
17
 
19
18
/* coding.cpp implements hex and base64 encoding/decoing
185
184
{
186
185
    word32 bytes = coded_.size();
187
186
    word32 plainSz = bytes - ((bytes + (pemLineSz - 1)) / pemLineSz); 
188
 
    plainSz = (plainSz * 3 + 3) / 4;
 
187
    plainSz = ((plainSz * 3) / 4) + 3;
189
188
    decoded_.New(plainSz);
190
189
 
191
190
    word32 i = 0;