Deluge's Encoding and Encryption functions

Deluge's Encoding and Encryption functions

Hello everyone,

In this post, let us discuss the  encryption functions  available in Deluge. Deluge supports a set of built-in functions to encode, decode, encrypt, and decrypt your data using various encryption standards.

Function
Description
Applicable services
Encodes text data to base 64 format
All services
Decodes the text encoded in base 64 format
All services
Decodes the text encoded in base 64 format and stores the returned values as a file object
All services
Encrypts the input text with the specified key using Advanced Encryption Standard (AES)
All services
Decrypts the AES encrypted text using the specified key and returns the original text
All services
Encrypts the input text with the specified key using AES-128 standard
All services except Zoho Creator
Decrypts the AES-128 encrypted text using the specified key and returns the original text
All services except Zoho Creator
Returns the hash value corresponding to the given text generated using HMAC-SHA1 algorithm
All services
Returns the hash value corresponding to the given text generated using HMAC-SHA256 algorithm
All services
Returns the hash value corresponding to the given text generated using MD5 algorithm
All services
Returns the hash value corresponding to the given text generated using HMAC-SHA256 algorithm
All services
Returns the hash value corresponding to the given text, generated using SHA512 algorithm
All services
Encodes all spaces and other characters disallowed in URLs and returns the encoded text
All services
Encodes all spaces and other characters disallowed in URLs and returns the encoded text. The difference between this function and encodeUrl function is that this function returns the space character as %20, and encodeUrl function returns the space character as +.
All services except Zoho Creator
Decodes the URLencoded text returns the original text
All services except Zoho Creator
Returns the hash value corresponding to the given text generated using the SHA1 algorithm
All services except Zoho Creator




Example 1: Encode query parameters using encodeUrl function

Consider you want to add leave in Zoho People using Deluge. You can achieve this by making an API call to  Zoho People - Add leave API   using  invokeUrl task .  This API requires leave details to be supplied as query parameters. In order to send values as query parameters, the values must be URL encoded. Query parameters if supplied without being encoded may cause an internal error and affect the invokeUrl task execution.  encodeUrl  Deluge function encodes the query parameters so they contain only the characters that are allowed to be in a URL. The following script encodes the query parameters and makes an API call to add leave in Zoho People using  invokeUrl task .

  1. // Store the input query parameters in the variable - param
  2. param =  "<Request><Record><field name=\"Employee_ID\">105893000000212005</field><field name=\"From\">25-Jul-2020</field><field name=\"To\">26-Jul-2020</field><field name=\"Leavetype\">105893000000287019</field></Record></Request>";

  1. // Encode the input query param using encodeUrl function
  2. encoded_param = encodeUrl(param);

  1. // Supply the encoded query parameters to invokeUrl task
  2. response = invokeurl
  3. [
  4. url : " https://people.zoho.com/people/api/leave/records?xmlData= "+  encoded_param
  5. type :POST
  6. connection:"zoho_people_connection"
  7. ];
  8. info response;

Example 2: Generate a base64 encoded username and password that can be sent in the header of a basic authentication type API request

The following example encodes username and password using   zoho.encryption.base64Encode function and constructs a text in a format that can be sent in the header of basic authentication type API request: 

  1. // store the user name and password in the variables username and password respectively
  2. username = "shawn_123";
  3. password = "MyPassword@123";

  1. // Encode the username and password in base64 format
  2. encoded_username = zoho.encryption.base64Encode(username);
  3. encoded_password = zoho.encryption.base64Encode(password);

  1. //Structure the encoded username and password in basic authentication format. This text can be supplied as header in basic authentication type API request.
  2. basic_authentication = "basic " + encoded_username + ":" + encoded_password; //Returns basic c2hhd25fMTIz:TXlQYXNzd29yZEAxMjM=





      Zoho Campaigns Resources


        • Desk Community Learning Series


        • Digest


        • Functions


        • Meetups


        • Kbase


        • Resources


        • Glossary


        • Desk Marketplace


        • MVP Corner


        • Word of the Day


        • Ask the Experts


          • Sticky Posts

          • Function #41: Sync Associated Subforms!

            Welcome back everyone! The last custom function showed how to update a Contact with Product details from it's Related list in Deals. This week, let's look at a function that lets you update subform records in two modules simultaneously when one of them is updated. Business scenario Let's look at how subform helps in an education institution that has deployed Zoho CRM. National Public School, Austin (made up, of course!) has set up Zoho CRM and it follows the same relationship pattern of "Students",

          Zoho CRM Plus Resources

            Zoho Books Resources


              Zoho Subscriptions Resources

                Zoho Projects Resources


                  Zoho Sprints Resources


                    Zoho Orchestly Resources


                      Zoho Creator Resources


                        Zoho WorkDrive Resources



                          Zoho CRM Resources

                          • CRM Community Learning Series

                            CRM Community Learning Series


                          • Tips

                            Tips

                          • Functions

                            Functions

                          • Meetups

                            Meetups

                          • Kbase

                            Kbase

                          • Resources

                            Resources

                          • Digest

                            Digest

                          • CRM Marketplace

                            CRM Marketplace

                          • MVP Corner

                            MVP Corner




                            Zoho Writer Writer

                            Get Started. Write Away!

                            Writer is a powerful online word processor, designed for collaborative work.

                              Zoho CRM コンテンツ








                                ご検討中の方

                                  • Recent Topics

                                  • How to Bulk-Update Sales Orders in CRM

                                    Hi - I need to bulk update existing sales orders with dates from our ERP of when the sales orders were created. I made a date field on the Sales Order module where I want to insert that data. I can't Mass Update because I am not updating the fields to
                                  • How do mass change start date and end date?

                                    You can mass do everything else, so maybe I'm missing something. But if I have a bunch of tasks and want to assign multiple tasks within a date set, how do I do that without doing them one by one?
                                  • Announcing New Features in Trident for macOS (v.1.2.0)

                                    Hello Community, Trident for macOS has quite a few new features that will improve your business email communication. Let's take a quick look at them. Creating templates Earlier, you could save email drafts as templates in Trident. With the current update,
                                  • Products in time entry

                                    Morning, Is there a way to add the product field to the time entry layout? Giving us the ability to identify a product per time entry. Thanks Rudy
                                  • Zoho.eu and U.S. Cloud Act? Can U.S. request Zoho.eu data?

                                    Given the current political situation in the U.S. and possible near future implications for data privacy and security, I am curious about Zoho’s obligation to comply with the U.S. cloud act or other U.S. requests for private customer information from
                                  • Zoholics Europe Awards

                                    We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! This is your chance to shout about the amazing things you've created, connected, or achieved with Zoho's developer application!
                                  • Why "balance due" for the VOIDED INVOICE is not zero?

                                    We wonder why the "balance due" for the VOIDED INVOICE is not zero? For example our case, we issued invoice for a client for MYR1000, then after client request for cancellation. Client haven't make payment yet. So we marked the invoice as void. We think
                                  • Format handling error

                                    Hi, I'm having an issue when merging a document using a custom function when with decimal numbers. In my template preview, it's seems correct ,but when I do the merge and attach the file to a record, all types of docs aren't displaying the number correctly.
                                  • Announcing New Features in Trident for macOS (v.1.20.0)

                                    Hello everyone! Trident for macOS is here with interesting features and enhancements to elevate your workplace communication and productivity. Let's take a quick look at them. Change the "From" email address easily. When composing or replying to an email,
                                  • Announcing new features in Trident for Windows (v.1.27.6.0)

                                    Hello Community, Trident for Windows is here with exciting new features to elevate your email communication. Let’s dive into what’s new! View and manage .pst files. A .pst (Personal Storage Table) file is an Outlook Data Storage file format for storing
                                  • Email limit reached

                                    I'm assessing whether zoho crm will work for our startup, however I tried to send emails to my leads and after 12 emails got the notification that email limit has been reached. That is ridiculously low. Whats wrong and how can you fix that. I am still
                                  • Importing Into Zoho CRM

                                    Do you have a list in Excel that you would like to import into Zoho CRM? If your administrator has not restricted your ability to import, the process is fairly easy to accomplish, but understanding the options can make everything go smoother. First you may need to prepare the spreadsheet Remove any extra rows from the top of the spreadsheet, like titles or blank lines. Row 1 should be the column headers. Row 2 should be where the data starts. Make sure that there is a column for any required fields
                                  • Analyze the Name of the Deal Owner and Created by

                                    I need to display the Name of the User who created a deal and the Deal Owner. Since both fields are lookups to the same table (Users), it defaults to the user record of the Deal Owner and I cannot display the name of who created it. I can generate the
                                  • Date Import Problems

                                    I'm trying to import products from csv/xls files, but I can't get the Sales Start Date field to import. I know the import is working because all the other information is imported, but the Sales Start Date field is left empty. I think it must be a format
                                  • Canvas and Related lists

                                    Hi, As much as I like canvas, when adding in a asection with related lists,it doesnt mimic the same functionality as the standard view within the CRM e.g left hand panel will show the module and total number of records. Is there a way of indicating this
                                  • New Search Function

                                    Hey Team, The search function updated in our CRM about a week ago, so I assume it was an automated update across Zoho. It no longer displays leads/deals etc in Chronological order so that the most recently created or updated is the first to display which
                                  • Problem with the "Search" function

                                    Hi, I've been using Workdrive for a few days and lately, the files I added in Workdrive don't appear in the search. It looks like my latest files aren't indexed. Are you aware of this issue ? 
                                  • [Webinar] Deluge Learning Series - AI-Powered Automation using Zoho Deluge and Gemini

                                    We’re excited to invite you to an exclusive 1-hour webinar where we’ll demonstrate how to bring the power of Google’s Gemini AI into your Zoho ecosystem using Deluge scripting. Whether you're looking to automate data extraction from PDFs or dynamically
                                  • Getting error "invalid warehouse_id" when trying to update any transaction in Zoho books

                                    I got a message from Zoho saying that the Warehouse and Branch has been merged into one category "Locations" Once I migrated to this setup I was no longer able to edit any invoice / create creadit notes - got an error saying "invalid warehouse_id" I never
                                  • Return "kit_quantity" when fetching Kit items via "List all the items" API call

                                    I have been appreciating the new Kits feature quite a bit, it is exactly what we were looking for in Zoho to solve many pain points. However, there is 1 problem I am running into and that is the fact there is no stock information that can be pulled for
                                  • Automating Pricing in Zoho Inventory Based on Brandline Quantity

                                    I am currently setting up my Zoho Inventory system and would like to implement an automatic pricing feature for sales orders. We have created a custom field called "brandline" for our items. All products with the same brandline value should have the same
                                  • Tags with Zapier

                                    Maybe I'm missing something....I hope so... Using tags for triggers is a key need.  This prevents us from having a ton of different lists. I am trying to find out how to add a tag using zapier when someone makes a purchase....but it doesn't seem to be
                                  • Print & PDF Support for Composite items

                                    There needs to be a way to print a composite item showing all the components, qty & images.
                                  • Build custom AI solutions with Catalyst’s QuickML capabilities in CRM

                                    Hello everyone, We’re thrilled to announce an improvement for our Zoho CRM Enterprise users: the ability to create custom AI solutions using Catalyst’s QuickML directly from Zoho CRM. As you may already know, Zia, Zoho CRM’s AI-powered assistant, offers
                                  • We cant create a custom function

                                  • Live webinar: Power-up your business presentations with Show's add-ons

                                    We all spend a good amount of time building presentations for meetings, reports, and pitches. But even with good content, slides can sometimes feel basic or less engaging. That’s where having the right tools helps. With Zoho Show’s add-ons, you can embed
                                  • Contractor recruitment

                                    We mainly supply contract staff, so there is an end point to when they are 'Hired'.  The problem we have is that once we have marked the candidate as 'Hired' there is no way that we can change their status afterwards without 'unhiring' them against the job. We need to be able to hire people for a fixed period of time, after which they would become 'available' again.  How do we go about doing this?
                                  • Writer very buggy and glitchy after only a few minutes of use... oh my.

                                    I am finding Writer to be very buggy and glitchy while using it. I've tried it in Firefox, Chrome, Safari... all Mac. Complete words get deleted on backspace (probably a feature, but disconcerting and bad design, esp. if you just want to delete a couple
                                  • How can I use the API to add a drop-shipping address to a sales order for one-time use?

                                    I need to be able to add a drop-shipping address for one-time use to a sales order via the API. Adding every such address to the contact (customer), then feeding the shippingaddress_id into the sales order, is not an acceptable approach; we have some
                                  • Zoho say my domain seems to be already associated with another account

                                    I created a website on zoho and associated my domain (bompescado.com) on it. You can see the A record and CNAME are working to it. Now I need to associate the same domain as webmail, but when I try it return with: " This domain name seems to be already associated with another account. If you own this domain, please contact us for assistance." Im following the advice and conctacting you to say I've not been associated this domain on zoho before.  What do I need? Well, I need you manually remove it
                                  • Mass Print Attachments from Selected Records in Custom Module

                                    Dear Zoho CRM Team, We’d like to request a feature enhancement regarding the handling of attachments. Use Case: We have a custom module that stores invoices uploaded by our affiliates. Currently, we need to open each record individually to print these
                                  • how to integrate zoho bigin to wordpress website ?

                                    hello , i want to integrate zoho bigin to wordpress webiste , can anyone help me with the tutorial ?
                                  • Surely it's time Inline editing from views

                                    I think the first request I found for in-line editing from grids was approximately 12 years ago - that post was locked because it was suggested Zoho sheetview solved the problem. However, it's now 2024, and in-line editing from grids is just a basic expectation.
                                  • Issue with POST request creating Calls in CRM

                                    Hello, I am in the middle of integrating some 3rd party Call center API with Zoho CRM and going through our logs I see some discrepencies. We sometimes get an error: {"data":[{"code":"INVALID_DATA","details":{"api_name":"Call_Duration","json_path":"$.data[0].Call_Duration"},"message":"Please
                                  • only lastname as index(?) field in custom module

                                    Hello, I have a small problem. I have created a custom module. The data records are only labeled with the last names. Also in the lookup etc.... It's stupid if you have different first names with the same surname. Then I only ever see the surname. In
                                  • How to read content out of File (Excel, Zoho Sheet, CSV) and iterate through rows

                                    Hello, I'd like to be able to iterate through all the rows in a CSV or Excel/Zoho Sheet file to perform actions on them. How is this possible in Flow? Thanks in advance! Best regards, Sven
                                  • Import CSV file into Zoho CRM using Zoho Flow?

                                    Is there a way to automate the import of contacts from Zoho Flow to Zoho CRM? I have a csv file on a remote server that I would like to pull off and import/update on a schedule.  I know you can do it with Zapier but I would like to stay within the Zoho
                                  • TDS Filing

                                    Is there any option for automatic 26Q and 24Q filing in Zoho books. Even Tally has this option. Why don't Zoho has this ? Is there any customisation available for this ?
                                  • Sorry to inform you that currently we cannot access the subform fields through writer deluge (zoho.writer.mergeAndSend).

                                    This is the premium support answer from zoho. It means we cannot merge and send thru deluge related records (sub forms) items... Has anybody suffered from the same ordeal ? DO you have a workaround ? If not can you vote for this feature to be added to
                                  • Quotes

                                    Has anyone figured out how to automatically upload a quote that was signed via Zoho Sign and insert it directly to that leads file and push it through the pipeline to proposal signed status?
                                  • Next Page