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

    application solution

    Popular Salesforce Blogs

    When is the Right Time to Migrate to Salesforce Lightning Experience?

    When is the Right Time to Migrate to Salesforce Lightning Experience?

    Blog in Lightning

    Oh! You are here, which means you are intrigued and excited about Salesforce Lightning experience. Let’s start with a general question that’s on everyone’s mind:…

    Classic to Lightning Migration, MIgrating to Lightning Experience, Right time to migrate to Lightning experinece, Salesforce Lightning, VF to Lightning Experience
    Amandeep Jun 20, 2018
    4,696  Views

    New Salesforce Agentforce Accelerator Empowers Nonprofits for Greater Impact

    Blog in Salesforce

    Salesforce has launched the Agentforce Accelerator for Impact, an initiative to help nonprofits harness Agentforce, an innovative AI layer on the Salesforce Platform. This technology…

    Cloudmetic Aug 1, 2025
    202  Views
    SystemVisualforceException - Getting content from within triggers is currently not supported

    System.VisualforceException: Getting content from within triggers is currently not supported

    Blog in Salesforce Apex

    System.VisualforceException: Getting content from within triggers is currently not supported (Salesforce Visualforce Error Notification) ---------------------------- Hi All, Recently I was working on a task in…

    getContentAsPdf(), Salesforce Apex, Salesforce Apex Code, Salesforce Apex Page, Salesforce Apex Trigger
    arpit Apr 2, 2018
    15,570  Views

    Popular Salesforce Videos

    Building a Custom UI with Lightning Web Components | Salesforce Tutorial

    Building a Custom UI with Lightning Web Components | Salesforce Tutorial

    Video in Lightning, Salesforce Training

    Lightning Web Components is a modern JavaScript framework that leverages the web standards breakthroughs over the past few years. Watch this session to understand how…

    Salesforce Training, Salesforce Tutorial, salesforce platform, UI, Salesforce Video
    Rupal Kakkar Apr 29, 2021
    2,260  Views
    Product Rule Vs Price Rule Salesforce CPQ

    Product Rule Vs Price Rule Salesforce CPQ

    Video in Others, Salesforce Stories

    Product Rule CPQ product rules help ensure sales reps are putting together the right products and bundles every single time. You don’t have to worry…

    Salesforce Training, Salesforce CPQ, Salesforce Video, Product Rules, Product Rule
    Jogender Jun 10, 2020
    6,704  Views
    How Salesforce is Paving The Way To Greater Digital Transformation

    How Salesforce is Paving The Way To Greater Digital Transformation

    Video in Salesforce Stories

    Digital transformation success is often a question of speed & implementation. Companies know how important technology is to their business, but can they evolve and…

    Salesforce Training, salesforce, CRM, Salesforce Video, Salesforce Learning
    Algoworks Jul 19, 2021
    1,525  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®.

    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.