Toggle Side Panel

  • Home
  • Articles
    • All Articles
    • Blogs
    • Videos
    • Infographics
  • 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
  • Marketplace
  • Advertise With Us
  • Contact Us
  • Discussions
More options
    Sign in Sign up
    • Home
    • Articles
      • All Articles
      • Blogs
      • Videos
      • Infographics
    • 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
    • Marketplace
    • Advertise With Us
    • 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, 1 month 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

    application solution

    Popular Salesforce Blogs

    Customer Experience with Salesforce

    10 Tips For Slicker Call Handling & Improving Customer Experience with Salesforce

    Blog in Others

    In today’s world of social media, Amazon, Uber, Airbnb and the like, smartphones, tablets, touchscreens and Smart TV’s is it any wonder that as customers…

    call handling, Call Metrics, Call Monitoring, Call Recording, Connected Customer
    Ian Mar 18, 2020
    5,672  Views

    Meet The world's First Real-Time CRM - Salesforce Genie

    Blog in Data, Salesforce, Salesforce Cloud Platform

    The most awaited, magnificent event, Salesforce Dreamforce 2022 was an incredible experience with a series of significant updates and announcements. Upcoming blogs will unravel all the…

    AppExchange, Boost Productivity, Built-in Connectors, Built-in Data, Business
    Apphienz Oct 14, 2022
    1,940  Views

    Simplifying Salesforce CPQ Migration: A Spotlight on iSyncSF

    Blog in Salesforce Data integration

    In the dynamic landscape of modern business, the seamless transition of critical systems like Salesforce CPQ (Configure, Price, Quote) between different Salesforce orgs is paramount.…

    Business Transformations, Configuration Mapping, Data Integrity, Data Management, Data Migration
    H2TECH Apr 2, 2024
    499  Views

    Popular Salesforce Videos

    Understanding Future Method | Difference Between Asynchronous and Synchronous Apex in Salesforce

    Understanding Future Method | Difference Between Asynchronous and Synchronous Apex in Salesforce

    Video in Salesforce Apex, Salesforce Training

    In this video, Shrey explained Synchronous Apex and Asynchronous Apex in a simple way. He also explained the importance of the Future method in Salesforce.…

    Salesforce Training, Salesforce Administrator, salesforce, Salesforce Video, Salesforce Learning
    Abhishek Mar 2, 2021
    4,600  Views
    Salesforce Integration Tutorial | Integrate Salesforce with Apps

    Salesforce Integration Tutorial | Integrate Salesforce with Apps

    Video in Salesforce Integration

    This "?????????? ??????????? ????????" video by Edureka will help you understand what is Salesforce integration in detail. It will also address the various Salesforce integration…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, Salesforce Integration Tutorial
    Pooja Feb 14, 2022
    4,262  Views
    Set Up a Microsoft Exchange Service Account to Sync with Salesforce (Using Command Shell)

    Set Up a Microsoft Exchange Service Account to Sync with Salesforce (Using Command Shell)

    Video in Salesforce Integration

    You can sync sales reps’ contacts and events between your Microsoft Exchange-based email and Salesforce using the Salesforce feature Lightning Sync. If you’re an Exchange…

    Salesforce Integration, Salesforce Lightning Experience, Salesforce Microsoft Integration, Microsoft Exchange Service Account Sync with Salesforce, Email Handling
    Jogender Feb 20, 2018
    4,908  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

    © 2025 - 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®.

    Try AuditMyCRM - It is a Salesforce CRM Audit tool which comprehensively scans your Salesforce org and gives you the list of errors or warnings you need to take care of.
    We use cookies to enhance your browsing experience. Please see our privacy policy if you'd like more information on our use of cookies.