befor64 Module

module~~befor64~2~~UsesGraph module~befor64~2 befor64 module~befor64_pack_data_m~2 befor64_pack_data_m module~befor64_pack_data_m~2->module~befor64~2 module~penf~3 penf module~penf~3->module~befor64~2 module~penf~3->module~befor64_pack_data_m~2 module~penf_global_parameters_variables penf_global_parameters_variables module~penf_global_parameters_variables->module~penf~3 module~penf_b_size~4 penf_b_size module~penf_global_parameters_variables->module~penf_b_size~4 module~penf_stringify~3 penf_stringify module~penf_global_parameters_variables->module~penf_stringify~3 module~penf_b_size~4->module~penf~3 module~penf_b_size~4->module~penf_stringify~3 module~penf_stringify~3->module~penf~3 iso_fortran_env iso_fortran_env iso_fortran_env->module~penf_stringify~3
Help

BeFoR64, Base64 encoding/decoding library for FoRtran poor people.



Variables

TypeVisibility AttributesNameInitial
logical, public :: is_b64_initialized =.false.

Flag for checking the initialization of the library.

character(len=64), private :: base64 ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Base64 alphabet.


Interfaces

public interface b64_encode

Encode numbers (integer and real) to base64.

  • private pure subroutine b64_encode_R8(n, code)

    Encode scalar number to base64 (R8P).

    Arguments

    Type IntentOptional AttributesName
    real(kind=R8P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_R8_a(n, code)

    Encode array numbers to base64 (R8P).

    Arguments

    Type IntentOptional AttributesName
    real(kind=R8P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_R4(n, code)

    Encode scalar number to base64 (R4P).

    Arguments

    Type IntentOptional AttributesName
    real(kind=R4P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_R4_a(n, code)

    Encode array numbers to base64 (R4P).

    Arguments

    Type IntentOptional AttributesName
    real(kind=R4P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_I8(n, code)

    Encode scalar number to base64 (I8P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I8P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_I8_a(n, code)

    Encode array numbers to base64 (I8P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I8P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_I4(n, code)

    Encode scalar number to base64 (I4P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I4P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_I4_a(n, code)

    Encode array numbers to base64 (I4P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I4P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_I2(n, code)

    Encode scalar number to base64 (I2P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I2P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_I2_a(n, code)

    Encode array numbers to base64 (I2P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I2P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_I1(n, code)

    Encode scalar number to base64 (I1P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I1P), intent(in) :: n

    Number to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_I1_a(n, code)

    Encode array numbers to base64 (I1P).

    Arguments

    Type IntentOptional AttributesName
    integer(kind=I1P), intent(in) :: n(1:)

    Array of numbers to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

  • private pure subroutine b64_encode_string(s, code)

    Encode scalar string to base64.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: s

    String to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

  • private pure subroutine b64_encode_string_a(s, code)

    Encode array string to base64.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: s(1:)

    String to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded scalar.

private interface b64_encode_up

Encode unlimited polymorphic variable to base64.

  • private interface b64_encode_up()

    Encode unlimited polymorphic variable to base64.

    Arguments

    None
  • private pure subroutine b64_encode_up_a(up, code)

    Encode an unlimited polymorphic array to base64.

    Arguments

    Type IntentOptional AttributesName
    class(*), intent(in) :: up(1:)

    Unlimited polymorphic variable to be encoded.

    character(len=:), intent(out), allocatable:: code

    Encoded array.

public interface b64_decode

Decode numbers (integer and real) from base64.

  • private elemental subroutine b64_decode_R8(code, n)

    Decode a base64 code into a scalar number (R8P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    real(kind=R8P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_R8_a(code, n)

    Decode a base64 code into an array numbers (R8P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    real(kind=R8P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_R4(code, n)

    Decode a base64 code into a scalar number (R4P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    real(kind=R4P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_R4_a(code, n)

    Decode a base64 code into an array numbers (R4P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    real(kind=R4P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_I8(code, n)

    Decode a base64 code into a scalar number (I8P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    integer(kind=I8P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_I8_a(code, n)

    Decode a base64 code into an array numbers (I8P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    integer(kind=I8P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_I4(code, n)

    Decode a base64 code into a scalar number (I4P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    integer(kind=I4P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_I4_a(code, n)

    Decode a base64 code into an array numbers (I4P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    integer(kind=I4P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_I2(code, n)

    Decode a base64 code into a scalar number (I2P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    integer(kind=I2P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_I2_a(code, n)

    Decode a base64 code into an array numbers (I2P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    integer(kind=I2P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_I1(code, n)

    Decode a base64 code into a scalar number (I1P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    integer(kind=I1P), intent(out) :: n

    Number to be decoded.

  • private pure subroutine b64_decode_I1_a(code, n)

    Decode a base64 code into an array numbers (I1P).

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    integer(kind=I1P), intent(out) :: n(1:)

    Array of numbers to be decoded.

  • private elemental subroutine b64_decode_string(code, s)

    Decode a base64 code into a scalar string.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    character(len=*), intent(out) :: s

    String to be decoded.

  • private pure subroutine b64_decode_string_a(code, s)

    Decode a base64 code into an array of strings.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded scalar.

    character(len=*), intent(out) :: s(1:)

    String to be decoded.

private interface b64_decode_up

Decode unlimited polymorphic variable from base64.

  • private interface b64_decode_up()

    Decode unlimited polymorphic variable from base64.

    Arguments

    None
  • private subroutine b64_decode_up_a(code, up)

    Decode an unlimited polymorphic array from base64.

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(in) :: code

    Encoded array.

    class(*), intent(out) :: up(1:)

    Unlimited polymorphic variable to be decoded.


Subroutines

public subroutine b64_init()

Initialize the BeFoR64 library.

Arguments

None

private pure subroutine encode_bits(bits, padd, code)

Encode a bits stream (must be multiple of 24 bits) into base64 charcaters code (of length multiple of 4).

Arguments

Type IntentOptional AttributesName
integer(kind=I1P), intent(in) :: bits(1:)

Bits to be encoded.

integer(kind=I4P), intent(in) :: padd

Number of padding characters ('=').

character(len=*), intent(out) :: code

Characters code.

private pure subroutine decode_bits(code, bits)

Decode a base64 string into a sequence of bits stream.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Characters code.

integer(kind=I1P), intent(out) :: bits(1:)

Bits decoded.

public subroutine b64_encode_up(up, code)

Encode an unlimited polymorphic scalar to base64.

Arguments

Type IntentOptional AttributesName
class(*), intent(in) :: up

Unlimited polymorphic variable to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_up_a(up, code)

Encode an unlimited polymorphic array to base64.

Arguments

Type IntentOptional AttributesName
class(*), intent(in) :: up(1:)

Unlimited polymorphic variable to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

public subroutine b64_decode_up(code, up)

Decode an unlimited polymorphic scalar from base64.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

class(*), intent(out) :: up

Unlimited polymorphic variable to be decoded.

private subroutine b64_decode_up_a(code, up)

Decode an unlimited polymorphic array from base64.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

class(*), intent(out) :: up(1:)

Unlimited polymorphic variable to be decoded.

private pure subroutine b64_encode_R16(n, code)

Encode scalar number to base64 (R16P).

Arguments

Type IntentOptional AttributesName
real(kind=R16P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_R8(n, code)

Encode scalar number to base64 (R8P).

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_R4(n, code)

Encode scalar number to base64 (R4P).

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_I8(n, code)

Encode scalar number to base64 (I8P).

Arguments

Type IntentOptional AttributesName
integer(kind=I8P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_I4(n, code)

Encode scalar number to base64 (I4P).

Arguments

Type IntentOptional AttributesName
integer(kind=I4P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_I2(n, code)

Encode scalar number to base64 (I2P).

Arguments

Type IntentOptional AttributesName
integer(kind=I2P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_I1(n, code)

Encode scalar number to base64 (I1P).

Arguments

Type IntentOptional AttributesName
integer(kind=I1P), intent(in) :: n

Number to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_string(s, code)

Encode scalar string to base64.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: s

String to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private pure subroutine b64_encode_R16_a(n, code)

Encode array numbers to base64 (R16P).

Arguments

Type IntentOptional AttributesName
real(kind=R16P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_R8_a(n, code)

Encode array numbers to base64 (R8P).

Arguments

Type IntentOptional AttributesName
real(kind=R8P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_R4_a(n, code)

Encode array numbers to base64 (R4P).

Arguments

Type IntentOptional AttributesName
real(kind=R4P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_I8_a(n, code)

Encode array numbers to base64 (I8P).

Arguments

Type IntentOptional AttributesName
integer(kind=I8P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_I4_a(n, code)

Encode array numbers to base64 (I4P).

Arguments

Type IntentOptional AttributesName
integer(kind=I4P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_I2_a(n, code)

Encode array numbers to base64 (I2P).

Arguments

Type IntentOptional AttributesName
integer(kind=I2P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_I1_a(n, code)

Encode array numbers to base64 (I1P).

Arguments

Type IntentOptional AttributesName
integer(kind=I1P), intent(in) :: n(1:)

Array of numbers to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded array.

private pure subroutine b64_encode_string_a(s, code)

Encode array string to base64.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: s(1:)

String to be encoded.

character(len=:), intent(out), allocatable:: code

Encoded scalar.

private elemental subroutine b64_decode_R16(code, n)

Decode a base64 code into a scalar number (R16P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

real(kind=R16P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_R8(code, n)

Decode a base64 code into a scalar number (R8P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

real(kind=R8P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_R4(code, n)

Decode a base64 code into a scalar number (R4P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

real(kind=R4P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_I8(code, n)

Decode a base64 code into a scalar number (I8P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

integer(kind=I8P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_I4(code, n)

Decode a base64 code into a scalar number (I4P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

integer(kind=I4P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_I2(code, n)

Decode a base64 code into a scalar number (I2P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

integer(kind=I2P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_I1(code, n)

Decode a base64 code into a scalar number (I1P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

integer(kind=I1P), intent(out) :: n

Number to be decoded.

private elemental subroutine b64_decode_string(code, s)

Decode a base64 code into a scalar string.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

character(len=*), intent(out) :: s

String to be decoded.

private pure subroutine b64_decode_R16_a(code, n)

Decode a base64 code into an array numbers (R16P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

real(kind=R16P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_R8_a(code, n)

Decode a base64 code into an array numbers (R8P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

real(kind=R8P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_R4_a(code, n)

Decode a base64 code into an array numbers (R4P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

real(kind=R4P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_I8_a(code, n)

Decode a base64 code into an array numbers (I8P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

integer(kind=I8P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_I4_a(code, n)

Decode a base64 code into an array numbers (I4P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

integer(kind=I4P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_I2_a(code, n)

Decode a base64 code into an array numbers (I2P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

integer(kind=I2P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_I1_a(code, n)

Decode a base64 code into an array numbers (I1P).

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded array.

integer(kind=I1P), intent(out) :: n(1:)

Array of numbers to be decoded.

private pure subroutine b64_decode_string_a(code, s)

Decode a base64 code into an array of strings.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: code

Encoded scalar.

character(len=*), intent(out) :: s(1:)

String to be decoded.

public subroutine autotest()

Procedure for autotesting the library functionalities.

Arguments

None