Skip to content

BeFoR64Base64 for Fortran

Pure Fortran 2003+ library for base64 encoding and decoding of intrinsic types

Quick start ​

fortran
use befor64

call b64_init() ! initialise once

! encode a scalar real
character(len=:), allocatable :: code
call b64_encode(n=1.0_R8P, code=code)

! encode an integer array
call b64_encode(n=[12_I4P, 1_I4P], code=code)

! decode back
real(R8P) :: val
call b64_decode(code='AAAAAAAA8D8=', n=val)

b64_init must be called at the very beginning of encode/decode operations (just once). The flag is_b64_initialized can be checked at any time to confirm the library is ready.

Authors ​

Contributions are welcome — see the Contributing page.

Copyrights ​

BeFoR64 is distributed under a multi-licensing system:

Use caseLicense
FOSS projectsGPL v3
Closed source / commercialBSD 2-Clause
Closed source / commercialBSD 3-Clause
Closed source / commercialMIT