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

    Guided Field Service and Warehouse Inventory Management | Salesforce

    Blog in Lightning, Salesforce

    Salesforce Field Service Lightning is the Salesforce product that works best for any business that involves people working in the field for repairs, maintenance, deliveries,…

    Business, Company Warehouse, Customer Sites, Distribution Centres, Field Service
    360 Degree Dec 21, 2021
    2,305  Views
    Rich Text Emails

    Send Rich Text Emails Using Salesforce Flow

    Blog in Salesforce Admin, Salesforce Apex

    You may now send rich text emails via Salesforce Flows, which was introduced in the Spring '21 release. Previously, when sending an email using Flow's…

    Automation, Automation Needs, automation tools, Classic Email Template, Cloud Flow Designer
    Arpit Singhal Jun 6, 2022
    9,762  Views

    7 Salesforce Products that can Transform Your Business

    Blog in Salesforce Products

    Salesforce is a top-rated CRM that offers businesses a diverse range of products to enhance their business model and operations. With each Salesforce product specifically…

    Application Cloud, Application Program, Browser Interface, Business, Business Intelligence
    LevelShift (formerly DemandBlue) Jan 31, 2022
    2,411  Views

    Popular Salesforce Videos

    Journey To A Salesforce Solution Architect

    Journey To A Salesforce Solution Architect

    Video in Salesforce Training

    A Salesforce Solution Architect must master a number of skills to be able to solve complex business requirements. In this session, we will cover 10…

    Salesforce Training, Salesforce Tutorial, Salesforce Video, Salesforce Learning, Business Requirements
    Rupal Kakkar Jul 8, 2021
    1,731  Views
    Dreamforce 2019 - An Overview!

    Dreamforce 2019 - An Overview!

    Video in Others

    Salesforce Dreamforce2019 is scheduled for November 19-22 in San Francisco, California at the Moscone Center. #Dreamforce is one of the largest cloud and SaaS-centric conferences…

    Dreamforce Event, Salesforce Events, Dreamforce 2019, Salesforce Enthusiast, DF 19
    Algoworks Nov 14, 2019
    2,463  Views
    Salesforce Developer Tutorial - How and When to Use Apex Managed Sharing

    Salesforce Developer Tutorial - How and When to Use Apex Managed Sharing

    Video in Salesforce Apex, Salesforce Training, Salesforce Development

    In this episode, we go over what Apex Managed Sharing is in Salesforce when you should actually use apex managed sharing and how to actually…

    Salesforce Training, Salesforce Tutorial, Salesforce Development, Salesforce Apex, Salesforce Developer
    Rupal Kakkar Dec 23, 2021
    2,732  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.