|
|
| (10 intermediate revisions by 2 users not shown) |
| Line 17: |
Line 17: |
| ==Component Source Code== | | ==Component Source Code== |
|
| |
|
| Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_Base64.fcfx FC_Comp_Source_Base64.fcfx] | | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Base64.fcfx FC_Comp_Source_Base64.fcfx] |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Base64.fcfx FC_Comp_Source_Base64.fcfx] | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Base64.fcfx FC_Comp_Source_Base64.fcfx] |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 44: |
Line 50: |
|
| |
|
| ==Examples== | | ==Examples== |
| | |
| | |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 67: |
Line 79: |
| {{Fcfile|Base64Tests.fcfx|Base64 Tests}} | | {{Fcfile|Base64Tests.fcfx|Base64 Tests}} |
|
| |
|
| ==Macro reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Encode'''
| |
| |-
| |
| | colspan="2" | Encodes an array of bytes into a base64 encoded string
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | BinaryData
| |
| |-
| |
| | colspan="2" | Raw binary data array you wish to encode
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | ByteCount
| |
| |-
| |
| | colspan="2" | Number of bytes of data to encode
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Decode'''
| |
| |-
| |
| | colspan="2" | Decodes a base64 encoded string into an array of bytes. Populates the BinaryData parameter array with the decoded data. Returns the number of decoded data bytes.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | BinaryData
| |
| |-
| |
| | colspan="2" | Variable to hold the decoded binary data
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" | Base64Data
| |
| |-
| |
| | colspan="2" | Data string you wish to decode
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
|
| |
|
|
| |
|
| ==Property reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}==Macro reference==
| |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Encode'''
| |
| |-
| |
| | colspan="2" | Encodes an array of bytes into a base64 encoded string
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | BinaryData
| |
| |-
| |
| | colspan="2" | Raw binary data array you wish to encode
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | ByteCount
| |
| |-
| |
| | colspan="2" | Number of bytes of data to encode
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Decode=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Decode''' | | | width="90%" class="mtx-class-macrohead" | '''Decode''' |
| |- | | |- |
| | colspan="2" | Decodes a base64 encoded string into an array of bytes. Populates the BinaryData parameter array with the decoded data. Returns the number of decoded data bytes. | | | colspan="2" | Decodes a base64 encoded string into an array of bytes. Populates the BinaryData parameter array with the decoded data. Returns the number of decoded data bytes. |
| Line 172: |
Line 115: |
|
| |
|
|
| |
|
| | | ===Encode=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Encode''' | | | width="90%" class="mtx-class-macrohead" | '''Encode''' |
| |- | | |- |
| | colspan="2" | Encodes an array of bytes into a base64 encoded string | | | colspan="2" | Encodes an array of bytes into a base64 encoded string |
| Line 204: |
Line 137: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Decode'''
| |
| |-
| |
| | colspan="2" | Decodes a base64 encoded string into an array of bytes. Populates the BinaryData parameter array with the decoded data. Returns the number of decoded data bytes.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | BinaryData
| |
| |-
| |
| | colspan="2" | Variable to hold the decoded binary data
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| |
| | width="90%" | Base64Data
| |
| |-
| |
| | colspan="2" | Data string you wish to decode
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |} | | |} |
| Author
|
Matrix TSL
|
| Version
|
1.0
|
| Category
|
Calculation
|
Base 64 component
Component to allow base 64 encoding and decoding. Sometimes when communicating raw binary data it is useful to perform base 64 encoding to ensure that none of your data bytes trigger any escape codes or other special case conditions. Base64 converts your binary data into readable data using standard ASCII characters so you can be fairly certain that the data you send is the same as the data that is received.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Base64.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Base64.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Here is a basic example that shows how to convert data into base64 encoded data and visa versa.
Base64 Tests
Macro reference
Decode
|
Decode
|
| Decodes a base64 encoded string into an array of bytes. Populates the BinaryData parameter array with the decoded data. Returns the number of decoded data bytes.
|
- BYTE
|
BinaryData
|
| Variable to hold the decoded binary data
|
- STRING
|
Base64Data
|
| Data string you wish to decode
|
- UINT
|
Return
|
Encode
|
Encode
|
| Encodes an array of bytes into a base64 encoded string
|
- BYTE
|
BinaryData
|
| Raw binary data array you wish to encode
|
- UINT
|
ByteCount
|
| Number of bytes of data to encode
|
- STRING
|
Return
|
Property reference
|
Properties
|