/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * Base64 handlers * * Author: * Miguel de Icaza (miguel@kernel.org) */ #include #include "gmime-base64.h" #define BSIZE 512 /* * 64-based alphabet used by the the Base64 enconding */ static char *base64_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * gmime_encode_base64_to_stream: * @input: The data source to be encoded in base64 format * @output: Where to put the encoded information in. * * This routine encodes the information pulled from @input using * base64 encoding and stores it on the @output CamelStream object */ void gmime_encode_base64_to_stream (CamelStream *input, CamelStream *output) { char buffer [BSIZE]; char obuf [80]; /* Output is limited to 76 characters, rfc2045 */ int n, i, j, state; int keep = 0; state = 0; j = 0; while ((n = camel_stream_read (input, buffer, sizeof (buffer))) > 0){ for (i = 0; i < n; i++, state++){ char c = buffer [i]; switch (state % 3){ case 0: obuf [j++] = base64_alphabet [c >> 2]; keep = (c & 3) << 4; break; case 1: obuf [j++] = base64_alphabet [keep | (c >> 4)]; keep = (c & 0xf) << 2; break; case 2: obuf [j++] = base64_alphabet [keep | (c >> 6)]; obuf [j++] = base64_alphabet [c & 0x3f]; break; } if (j == 72){ obuf [j++] = '\r'; obuf [j++] = '\n'; camel_stream_write (output, obuf, j); j = 0; } } } switch (state % 3){ case 0: /* full output, nothing left to do */ break; case 1: obuf [j++] = base64_alphabet [keep]; obuf [j++] = '='; obuf [j++] = '='; break; case 2: obuf [j++] = base64_alphabet [keep]; obuf [j++] = '='; break; } camel_stream_write (output, obuf, j); camel_stream_flush (output); } /** * gmime_decode_base64: * @input: A buffer in base64 format. * @output: Destination where the decoded information is stored. * * This routine decodes the base64 information pulled from @input * and stores it on the @output CamelStream object. */ void gmime_decode_base64 (CamelStream *input, CamelStream *output) { } ption> FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p
Commit message (Expand)AuthorAgeFilesLines
* Fix CPU affinity of net-p2p/cpuminer port threadsmm2014-02-192-1/+12
* - Bump PORTREVISION after KDE4_PREFIX changemakc2014-02-182-2/+2
* - Update to 0.16.15nemysis2014-02-164-25/+3
* - Reassign lioux' ports to the heaptabthorpe2014-02-152-2/+2
* - STAGE-cleangahr2014-02-142-6/+6
* - Update to 0.16.14nemysis2014-02-144-11/+29
* - Convert USE_SCONS to USESmiwi2014-02-131-18/+17
* Namecoin is an open source decentralized key/value registration and transferswills2014-02-1310-0/+272
* - Fix build after boost updateswills2014-02-134-52/+58
* - Stage supportmiwi2014-02-121-2/+1
* - Stage supportmiwi2014-02-121-2/+1
* - Convert to USESmiwi2014-02-121-2/+1
* - Stage supportmiwi2014-02-121-4/+0
* - Stage supportmiwi2014-02-122-2/+0
* - Stage supportmiwi2014-02-121-1/+0
* - Stage supportmiwi2014-02-121-2/+1
* - Stage supportmiwi2014-02-121-1/+0
* According to the Porter's Handbook (5.12.2.3.) default options must be added toehaupt2014-02-105-0/+14
* - Update to 0.8.6.2swills2014-02-107-68/+74
* net-p2p/dogecoin: Fix DragonFly (broken by OSVERSION)marino2014-02-101-1/+1
* - do not use easy_install, convert to auto-generated packing listrm2014-02-102-52/+7
* net-p2p/litecoin: Fix DragonFly (broken by OSVERSION)marino2014-02-101-1/+1
* Fix plistantoine2014-02-091-5/+6
* - Fix after change to options in masterswills2014-02-081-1/+1
* - Fix buildmiwi2014-02-072-49/+26
* Chase boost and icu bumpbapt2014-02-079-5/+9
* - Add patch, fix build net-p2p/qbittorrent-nox11nemysis2014-02-072-2/+44
* - Use more correct OSVERSION check [1]swills2014-02-071-10/+9
* - Stage supportmiwi2014-02-061-11/+8
* - Stage supportmiwi2014-02-061-4/+3
* net-p2p/gkremldk: Fix for new linkers (-Wl must have an argument)marino2014-02-061-0/+11
* - Update to 3.1.8, BUGFIX: Really fix build of v3.1.6nemysis2014-02-042-3/+3
* net-p2p/libtorrent-rasterbarnemysis2014-02-043-6/+21
* - Update to 1.5.0swills2014-02-026-44/+79
* Mark broken: Fails to buildantoine2014-02-011-0/+2
* - Update to 3.1.5nemysis2014-02-012-3/+4
* - add stage supportaz2014-01-308-12/+5
* Deprecate ports broken for more than 6 monthbapt2014-01-281-0/+2
* - Use USES=compiler:c++11-lang instead of compiler:c++11-libnemysis2014-01-221-1/+1
* Fix properties on pkg-plistbapt2014-01-221-1/+0
* Digitalcoin is an open source digital currency, originally based on Bitcoin,swills2014-01-197-0/+104
* - Add patch to prevent 100% CPU at idleswills2014-01-192-1/+12
* Zetacoin is a free open source peer-to-peer electronic cash system thatswills2014-01-1813-0/+319
* - Update to 1.0.1miwi2014-01-175-62/+51
* - Support stage dirswills2014-01-172-3/+21
* - Support stage dirswills2014-01-172-9/+18
* - Switch to USES=gmakeswills2014-01-171-2/+2
* - Update to 1.4swills2014-01-162-5/+5
* - Fix build at 11.x [1]nemysis2014-01-151-4/+5
* Python cleanup:rene2014-01-142-2/+2
* - Support STAGEDIRbar2014-01-124-90/+145
* - Support STAGEDIRbar2014-01-123-84/+129
* Convert the tree to USES=famantoine2014-01-051-2/+1
* Add option to disable ownership and permissions checking in rc script.crees2014-01-042-6/+12
* - Bump PORTREVISIONnemysis2014-01-031-3/+3
* Fix stagecrees2014-01-021-1/+2
* Slave port of net-p2p/litecoin so as to allow litecoin-qt and litecoind toswills2014-01-022-0/+10
* Slave port of net-p2p/bitcoin so as to allow bitcoin-qt and bitcoind to easilyswills2014-01-022-0/+10
* - Update to 1.3 [1]swills2014-01-023-5/+17
* - Bump PORTREVISIONnemysis2013-12-312-2/+3
* - rename AL2 to APACHE20 in Mk/bsd.licenses.db.mkohauer2013-12-311-1/+1
* - Unbreak net-p2p/libtorrent-rasterbar to fix install of net-p2p/delugenemysis2013-12-301-0/+2
* - Update to 3.1.4nemysis2013-12-302-8/+13
* - Update to 0.16.13nemysis2013-12-302-5/+3
* Stage transmission ports and the rest maintained by me.crees2013-12-3010-35/+23
* net-p2p/py-vertex: support stagingwg2013-12-282-184/+1
* - Fix build with clangpawel2013-12-273-35/+30
* - support STAGEjadawin2013-12-271-9/+4
* Dogecoin is an open source peer-to-peer cryptocurrency, favored by Shiba Inusswills2013-12-206-0/+135
* - Update to 0.8.6.1swills2013-12-174-27/+56
* - Update to 0.8.6swills2013-12-173-16/+4
* Drop maintainershipbapt2013-12-171-1/+1
* Remove expired port:rene2013-12-165-276/+0
* Remove expired ports:rene2013-12-153-45/+0
* - Try fix under fbsd > 10az2013-12-151-0/+10
* Update to version 5.2.0.0pawel2013-12-152-3/+3
* Convert LIB_DEPENDS for ports depending on boostbapt2013-12-122-6/+6
* Convert LIB_DEPENDS for ports depending on boostbapt2013-12-124-8/+8
* New USES=twisted, to replace the old USE_TWISTED knob.mva2013-12-082-3/+2
* Add bitmessage 0.4.1, secure P2P communications client.feld2013-12-076-0/+272
* Mark as broken: fails to linkbapt2013-12-061-0/+2
* Mark as broken on i386 tooantoine2013-12-021-2/+0
* Try to unbreak for freebsd > 10.xaz2013-11-242-1/+12
* - Update to 3.1.3nemysis2013-11-233-4/+3
* - Pass QMAKE_ARGS to qmakemakc2013-11-223-6/+6
* - Convert to USES=qmake (and other USES while I'm here)makc2013-11-221-6/+2
* - Convert to dos2unix.mkmat2013-11-202-3/+3
* Remove expired ports:rene2013-11-186-57/+0
* Unbreak net-p2p/libtorrent-rasterbar-python to fix installrm2013-11-161-0/+2
* - Fix build on 10.0swills2013-11-161-0/+22
* Fix -qt4 build on 10.0-BETA3crees2013-11-142-2/+12
* - Update to 1.18.1sunpoet2013-11-112-5/+4
* Depend on gcc 4.6+ to get substantially higher hashrates on modern CPUsmm2013-11-081-8/+4
* net-p2p/retroshare: update to 0.5.5awg2013-11-068-140/+80
* net-p2p/qbittorrentnemysis2013-11-065-50/+32
* - Fix net-p2p/libtorrent-rasterbar dependency due to recent commitnemysis2013-11-062-3/+3
* - Copy libtorrent-rasterbar from libtorrent-rasterbar-16@r332964bdrewery2013-11-065-0/+237
* - Remove libtorrent-rasterbar to fix copy from libtorrent-rasterbar-16bdrewery2013-11-065-237/+0
* net-p2p/libtorrent-rasterbarnemysis2013-11-067-25/+27
* Simplify port and use SF for DISTFILESmm2013-11-063-14/+10
* Support STAGEDIR.vanilla2013-11-054-19/+15
* cpuminer is a simple daemon that performs Bitcoin or Litecoinmm2013-11-045-0/+49
* put hack for freebsd 10.x under OPSYS, this will unbreak build under dbsd portsaz2013-11-041-1/+1
* - Try to fix build on 10.x and fix segfault while running rtorrentaz2013-11-023-1/+22
* - Reassign to the heap at maintainers requesttabthorpe2013-11-021-1/+1
* The word 'very' has no place in COMMENTeadler2013-10-311-1/+1
* - use STAGEDIRdinoex2013-10-291-6/+5
* - use STAGEDIRdinoex2013-10-281-6/+11
* Update to libmpc version 1.0.1 which brings the following fixes:gerald2013-10-267-6/+7
* - Fix build on FreeBSD 10 (iconv, libc++).tijl2013-10-253-8/+115
* Support staging.ehaupt2013-10-241-2/+1
* - Support stagingmakc2013-10-232-9/+7
* - Remove manual creation and removal of share/applications, as it's now in th...amdmi32013-10-2217-28/+1
* - Update security/gpgme to 1.4.3jhale2013-10-211-1/+1
* net/transmission-qt4: Fix QMAKEFLAGS properlymarino2013-10-201-1/+1
* Fix build with clang on i386 by disabling inline asm that usestijl2013-10-191-0/+11
* deprecate ports broken for more than 6 monthbapt2013-10-181-0/+3
* - update to 0.11rm2013-10-174-6/+43
* Clean up some COMMENTseadler2013-10-161-1/+1
* - Mark DEPRECATED, set EXPIRATION_DATEnemysis2013-10-142-2/+7
* Fix package name collisionbapt2013-10-141-2/+1
* Add support for STAGEDIRpawel2013-10-131-6/+7
* Mark seven unmaintained ports as jobs unsafe.marino2013-10-071-0/+2
* Common changes:bar2013-10-052-15/+17
* Add an explicit dependency on pkgconfantoine2013-10-051-1/+1
* - Update from 1.17 to 1.18 [1]danilo2013-10-042-16/+13
* Add a DOCS optionbapt2013-10-042-7/+5
* net-p2p/valknut: add <unistd.h> for modern compilersmarino2013-10-031-0/+10
* - Bump PORTREVISION. Lazarus has been updated to 1.0.12acm2013-10-011-1/+1
* Fix after staging conversionbapt2013-09-241-1/+1
* - Update to 0.8.5.1swills2013-09-243-4/+26
* - Update to 0.8.5swills2013-09-243-62/+4
* - Bump PORTREVISION to fix missing PORTEXAMPLES,PORTDOCS,PORTDATAbdrewery2013-09-231-1/+1
* Use STAGEbapt2013-09-232-9/+7
* - fix misplaced NO_STAGE in slaveports and ifdefsdinoex2013-09-212-4/+3
* Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-21108-140/+134
* Add explicit QMAKE_LFLAGS for iconv.madpilot2013-09-191-0/+1
* - Use the new format for LIB_DEPENDSnemysis2013-09-182-4/+4
* Add an explicit dependency on pkgconfbapt2013-09-181-8/+2
* Add an explicit dependency on pkgconfbapt2013-09-181-0/+1
* Add a build dependency on perlbapt2013-09-181-2/+2
* Convert to new perl frameworkbapt2013-09-171-7/+3
* net-p2p/qbittorrentnemysis2013-09-174-9/+10
* net-p2p/transmission-cli: Fix USES and iconv supportmarino2013-09-141-3/+3
* Add explicit dependency on pkgconf (10 ports)marino2013-09-131-1/+1
* - convert to the new perl5 frameworkaz2013-09-131-2/+1
* - Update to version 5.1.0.0pawel2013-09-123-21/+19
* - convert to the new perl5 frameworkaz2013-09-116-31/+16
* Add an explicit dependency on pkgconfbapt2013-09-111-9/+3
* - Fix build on CURRENT (change in OpenSSL API)gahr2013-09-072-9/+48