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, 11 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

    Making Shift from Salesforce Classic to Lightning – Must Needed Steps to Follow

    Blog in Lightning

    Salesforce has rolled out its next-gen UI ‘Lightning‘ in 2014. The Lightning platform delivers reimagined user experience to enable fast & seamless app development. Enterprises…

    Application Integration, Business Processes, certified Lightning experts, Change Management, Classic UI
    CEPTES May 28, 2020
    1,888  Views

    5 Questions to Help Decide If a Salesforce Certification Is for You

    Blog in Salesforce Certifications

    Salesforce is used in nearly every industry and countless companies today, and its reach continues to expand. Salesforce dominates because the Customer Relationship Management (CRM)…

    Online Salesforce Training, Salesforce Administrator, Salesforce App Builder, Salesforce Certification, Salesforce Community
    Simplilearn Apr 15, 2019
    4,267  Views
    Connecting the Dots How MuleSoft Consulting Bridges Business Goals and IT Execution 

    Connecting the Dots: How MuleSoft Consulting Bridges Business Goals and IT Execution 

    Blog in Salesforce

    Modern corporate leaders design ambitious strategies to improve customer engagement and capture market share. However, execution depends entirely on underlying technical infrastructure. A significant gap…

    MuleSoft Consulting Services, MuleSoft Integration Services
    James Jun 23, 2026
    282  Views

    Popular Salesforce Videos

    5 Benefits of Integrating Mulesoft Into Your Business | Salesforce Integration

    5 Benefits of Integrating Mulesoft Into Your Business | Salesforce Integration

    Video in Salesforce Integration

    The MuleSoft integration solution has provided visionaries throughout the world with the power to connect all their data, systems, and devices seamlessly. Swipe to know…

    Salesforce Training, Salesforce Tutorial, Salesforce Integration, salesforce, Salesforce Video
    Cyntexa Jul 5, 2022
    1,542  Views
    Salesforce for Marketing

    Salesforce for Marketing

    Video in Marketing

    Learn how to bring marketing and engagement together. Salesforce Marketing Cloud helps you connect marketing, sales, service, and more on a single platform. Marketers get…

    Salesforce Marketing Cloud, Salesforce Video, sales, Marketing, Service
    Manpreet Jun 12, 2020
    1,627  Views
    Salesforce Agentforce for Nonprofits

    Salesforce Agentforce for Nonprofits

    Video in Others

    With Salesforce's latest AI tool, Agentforce, you can boost your Salesforce org with AI agents that can streamline workflows, reduce costs, and improve your constituent…

    salesforce, CRM, AI, Digital Transformation, Workflows
    DB Nov 25, 2025
    354  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.