Show last authors
1 == __**Introduction:**__ ==
2
3
4 This page is an introduction to the System functions EncodeBase64 that is used in order to encode a data. Base64 encoding function are commonly used when there is a need to encode binary data, especially when that data needs to be stored and transferred over media that are designed to deal with text. This encoding helps to ensure that the data remains intact without modification during transport and traduction.
5
6
7 == **__EncodeBase64 function Explanation:__** ==
8
9
10 ===== __**Definition:** __ =====
11
12
13 This fucntion is used to encode a content source (File or Text) to an output content (Text).
14
15 The content source is a human-readable format and it's transformed to an illisible format in base 64.
16
17
18 ===== __**How to use the function? :**__ =====
19
20
21 The EncodeBase64 funtion have 2 necessary parameters:
22
23 * The 1^^st^^ parameter is the **Source** that indicates if the content source is a file (BINARY) or a text (TXT). This parameter accepts just BINARY or TXT, otherwise, an error is generated.
24
25
26 * The 2^^nd^^ parameter is the one that contains the value to be transformed in Base64. There are 2 cases: when **Source **equals to **TXT,** the Param2 is a String value** **or when **Source **equals to **BINARY, **the Param2 is the connector's name that contains the file.
27
28
29 You can call this function inside a stylesheet and use it for a mapping or you can call it inside a connector, but the declaration differs in each case.
30
31
32 ====== //**First case:**// ======
33
34
35 In an XSL, to call this system function, we use this form ixf:EncodeBase64('TXT Or BINARY','Connector containing the file Or Value that you want to encode in Base64').
36
37
38 Ex: 
39
40
41 [[image:1639557128891-940.png]]
42
43
44 ====== //**Second case:**// ======
45
46
47 In the scenario, to call this system function inside a connector, we use this form {System.EncodeBase64;TXT Or BINARY;Connector containing the file Or Value that you want to encode in Base64}.
48
49
50 Ex :  ​​​​​​​[[image:1639557251050-613.png]]
51
52 ===== =====
53
54 ===== __**The result of this function :**__ =====
55
56
57 This function returns a String value of the encoded 2nd parameter value in Base64.
58
59
60 Return: **The encoded value in Base64 .**
61
62
63 ===== =====
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian