Toggle Side Panel

  • Blogs
  • Consultants
    • Salesforce Product Expertise
      • Top Salesforce ConsultantsTop Salesforce Consultants
      • Marketing Cloud ConsultantsMarketing Cloud Consultants
      • Service Cloud ConsultantsService Cloud Consultants
      • Experience Cloud ConsultantsExperience Cloud Consultants
      • Analytics Cloud ConsultantsAnalytics Cloud Consultants
    • Salesforce Industry Expertise
      • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
      • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
      • Health Cloud ConsultantsHealth Cloud Consultants
      • Commerce Cloud ConsultantsCommerce Cloud Consultants
      • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
    • Salesforce Experts by Location
      • USATop Salesforce Consultants in USA
      • IndiaTop Salesforce Consultants in India
      • AustraliaTop Salesforce Consultants in Australia
      • United KingdomTop Salesforce Consultants in UK
      • CanadaTop Salesforce Consultants in Canada
  • Webinars
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Blogs
    • Consultants
      • Salesforce Product Expertise
        • Top Salesforce ConsultantsTop Salesforce Consultants
        • Marketing Cloud ConsultantsMarketing Cloud Consultants
        • Service Cloud ConsultantsService Cloud Consultants
        • Experience Cloud ConsultantsExperience Cloud Consultants
        • Analytics Cloud ConsultantsAnalytics Cloud Consultants
      • Salesforce Industry Expertise
        • Non-Profit Cloud ConsultantsNon-Profit Cloud Consultants
        • Financial Service Cloud ConsultantsFinancial Service Cloud Consultants
        • Health Cloud ConsultantsHealth Cloud Consultants
        • Commerce Cloud ConsultantsCommerce Cloud Consultants
        • Manufacturing Cloud ConsultantsManufacturing Cloud Consultants
      • Salesforce Experts by Location
        • USATop Salesforce Consultants in USA
        • IndiaTop Salesforce Consultants in India
        • AustraliaTop Salesforce Consultants in Australia
        • United KingdomTop Salesforce Consultants in UK
        • CanadaTop Salesforce Consultants in Canada
    • Webinars
    • Contact Us
    • Discussions
    Close search

    Activity › Forums › Salesforce® Discussions › How to encrypte a url parameter in a visualforce page in Salesforce?

    Tagged: Account ID, Apex, Cypher Text, Encryption, URL Parameter, Visualforce Page

    • Salesforce® Discussions

      How to encrypte a url parameter in a visualforce page in Salesforce?

      Posted by Yogesh on November 8, 2019 at 1:07 PM

      i have to encrypte a url parameters on a vf page .

      Prachi replied 6 years, 10 months ago 2 Members · 1 Reply
      • Account ID
      • Apex
      • Cypher Text
      • Encryption
      • URL Parameter
      • Visualforce Page
    • 1 Reply
    • Prachi

      Member
      November 11, 2019 at 5:22 AM

      Hi Yogesh,

      Steps For  URL Encryption :

      Generate an AES key  to perform Encryption
      Blob key = Blob.valueOf(‘aAk!h@37WQ9bsAfk’);

      2 . Create a Encoded cypher text.

      Here we are encoding accountid into cypertext .  so consider acc.id as account id .

      string encodedCipherText = EncodingUtil.base64Encode(Crypto.encryptWithManagedIV('AES128', key, Blob.valueOf(acc.Id)));
      3. Encode cypher text using  URLEncode method

      string encodedId = encodingUtil.URLEncode(encodedCipherText,’UTF-8′);

      4. Now Embed encodeId to your visualforce page url like

      https://c.visualforce.com/apex/visualforcePage?id=’+encodedId

      Code for Encryption

      Blob key = Blob.valueOf('aAk!h@37WQ9bsAfk');
      string encodedCipherText = EncodingUtil.base64Encode(Crypto.encryptWithManagedIV('AES128', key, Blob.valueOf(c.Id)));
      string encodedId = encodingUtil.URLEncode(encodedCipherText,'UTF-8');

      Encrypted_URL__c = 'https://c.visualforce.com/apex/visualforcepage?id='+encodedId));

      Thanks.

    Log In to reply.

    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me
    • Public
    • All Members
    • My Connections
    • Only Me

    Popular Salesforce Blogs

    Integration of Salesforce with Google Calendar

    Integration of Salesforce with Google Calendar Using REST API

    Blog in Salesforce integration

    In this Blog, we are going to Integrate Salesforce with Google (Calendar, Email, Drive etc.) REST API. For this article, we are going to integrate…

    Apex REST API, API, API and Services, API Documentation, App Name
    Parvez Alam Nov 14, 2022
    5,352  Views

    Top 5 Best Practices for Managing Data in Salesforce

    Blog in Others

    Companies rely on Salesforce to help them make sense of all the data they collect, and if we take into account that Salesforce currently holds…

    Data Accuracy in Salesforce, Data Accuracy Tips, Data Automation Salesforce, Data Cleansing Salesforce, Data Export from Salesforce
    ildudkin Sep 19, 2024
    762  Views
    forceea data factory

    Forceea: The Enterprise Data Factory We've Been Waiting For | Salesforce

    Blog in Data

    Introduction Everybody needs testing records of SObjects: Developers need testing data for their unit tests. Testers need data for testing. Administrators and architects need data…

    Best Data Factory, Big Object, Complex Data Sets, Create Data, Create Templates
    Nikos Apr 8, 2021
    5,805  Views

    Popular Salesforce Videos

    What is Billing - Salesforce Revenue Cloud

    What is Billing - Salesforce Revenue Cloud

    Video in Salesforce Cloud Platform

    How can you transform your billing system for subscription and usage models? By dropping your legacy systems and streamlining your processes. In this video, learn…

    Salesforce Training, Salesforce Video, Customers, Salesforce Learning, Subscription
    Jogender Jan 27, 2021
    2,405  Views
    Salesforce Sales Cloud Basics

    Salesforce Sales Cloud Basics

    Video in Sales

    This short video shows how easy to create & manage leads and to convert it to opportunity, contacts & accounts using Salesforce Sales Cloud. Please…

    Salesforce Training, salesforce, Salesforce Video, Sales Cloud, Salesforce Learning
    SP Nov 10, 2020
    1,764  Views
    How to Enable the New Pardot Email Builder | Salesforce Pardot

    How to Enable the New Pardot Email Builder | Salesforce Pardot

    Video in Salesforce Products

    Learn how to set up the new Email Builder for Pardot and set up Salesforce CMS for email content storage. Watch this video and do…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Pardot
    Rupal Kakkar Dec 15, 2021
    2,758  Views
    Footer Forcetalks logo

    support@forcetalks.com

    • twitterx

    Quick Links

    Advertise with Us

    Salesforce® Articles

    Dreamforce 2023

    Top Salesforce® Bloggers 2023

    Top Salesforce Consultants

    Get Listed

    Company

    Contact Us

    About Us

    Privacy Policy

    Terms & Conditions

    InsightHub

    Salesforce Blogs

    Salesforce Videos

    Salesforce Groups

    Salesforce Jobs

    © 2026 - Forcetalks ● All Rights Reserved

    Salesforce® is a trademark of Salesforce® Inc. No claim is made to the exclusive right to use “Salesforce”. Any services offered within the Forcetalks website/app are not sponsored or endorsed by Salesforce®.

    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.