BeFoR64, Base64 encoding/decoding library for FoRtran poor people.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=64), | private | :: | base64 | = | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | Base64 alphabet. |
|
logical, | public | :: | is_b64_initialized | = | .false. | Flag for checking the initialization of the library. |
Decode numbers (integer and real) from base64.
Decode a base64 code into a scalar number (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
real(kind=R8P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R8P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
real(kind=R4P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R4P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I8P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I8P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I4P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I4P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I2P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I2P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I1P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I1P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
character(len=*), | intent(out) | :: | s | String to be decoded. |
Decode a base64 code into an array of strings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
character(len=*), | intent(out) | :: | s(1:) | String to be decoded. |
Decode unlimited polymorphic variable from base64.
Decode unlimited polymorphic variable from base64.
Decode an unlimited polymorphic array from base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
class(*), | intent(out) | :: | up(1:) | Unlimited polymorphic variable to be decoded. |
Encode numbers (integer and real) to base64.
Encode scalar number to base64 (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar string to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s | String to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array string to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s(1:) | String to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode unlimited polymorphic variable to base64.
Encode unlimited polymorphic variable to base64.
Encode an unlimited polymorphic array to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in) | :: | up(1:) | Unlimited polymorphic variable to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Decode a base64 code into a scalar number (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I1P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I1P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I2P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I2P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I4P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I4P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
integer(kind=I8P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
integer(kind=I8P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (R16P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
real(kind=R16P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (R16P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R16P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
real(kind=R4P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R4P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar number (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
real(kind=R8P), | intent(out) | :: | n | Number to be decoded. |
Decode a base64 code into an array numbers (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
real(kind=R8P), | intent(out) | :: | n(1:) | Array of numbers to be decoded. |
Decode a base64 code into a scalar string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
character(len=*), | intent(out) | :: | s | String to be decoded. |
Decode a base64 code into an array of strings.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
character(len=*), | intent(out) | :: | s(1:) | String to be decoded. |
Decode an unlimited polymorphic scalar from base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded scalar. |
||
class(*), | intent(out) | :: | up | Unlimited polymorphic variable to be decoded. |
Decode an unlimited polymorphic array from base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Encoded array. |
||
class(*), | intent(out) | :: | up(1:) | Unlimited polymorphic variable to be decoded. |
Encode scalar number to base64 (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I1P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I1P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I2P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I2P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (I8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I8P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (R16P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R16P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (R16P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R16P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (R4P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R4P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar number to base64 (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | n | Number to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array numbers to base64 (R8P).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=R8P), | intent(in) | :: | n(1:) | Array of numbers to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Encode scalar string to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s | String to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode array string to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | s(1:) | String to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode an unlimited polymorphic scalar to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in) | :: | up | Unlimited polymorphic variable to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded scalar. |
Encode an unlimited polymorphic array to base64.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in) | :: | up(1:) | Unlimited polymorphic variable to be encoded. |
||
character(len=:), | intent(out), | allocatable | :: | code | Encoded array. |
Initialize the BeFoR64 library.
Decode a base64 string into a sequence of bits stream.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | code | Characters code. |
||
integer(kind=I1P), | intent(out) | :: | bits(1:) | Bits decoded. |
Encode a bits stream (must be multiple of 24 bits) into base64 charcaters code (of length multiple of 4).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
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. |