Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6099009

Browse files
committed
Well, the correct code - that corresponds to current
encode - is below. I even got the linefeed stuff wrong.--marko
1 parenta8bc265 commit6099009

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎contrib/pgcrypto/encode.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $Id: encode.c,v 1.4.2.1 2001/05/13 03:27:49 momjian Exp $
29+
* $Id: encode.c,v 1.4.2.2 2001/05/15 04:45:35 momjian Exp $
3030
*/
3131

3232
#include"postgres.h"
@@ -349,7 +349,8 @@ hex_dec_len(uint srclen)
349349
uint
350350
b64_enc_len(uintsrclen)
351351
{
352-
returnsrclen+ (srclen+2 /3)+ (srclen / (76 /2))+2;
352+
/* 3 bytes will be converted to 4, linefeed after 76 chars */
353+
return (srclen+2)*4 /3+srclen / (76*3 /4);
353354
}
354355

355356
uint

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp