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

    [adinserter block="12"]

    Popular Salesforce Blogs

    Client Credentials

    OAuth 2.0 Client Credentials Flow | Salesforce Developer Guide

    Blog in Salesforce

    OAuth 2.0 has a flow called Client Credentials that is useful when there are requests to APIs that don't involve the user. The client credentials…

    API, Applications, Auth0, Authentication Methods, Authentication Scheme
    Mohit Kumar Nov 7, 2022
    5,935  Views
    Salesforce CRM

    How Can Salesforce CRM Boost its Sales Revenue?

    Blog in Salesforce

    Salesforce is a CRM that puts sales at the center of its operation. Salesforce has the capacity to do it just right, from acquiring precise…

    Appropriate Solution, Campaign Administration, Campaign Programs Email, Campaigns, Communication Channels
    Cymetrix Jun 4, 2021
    3,136  Views
    Salesforce CPQ

    How Salesforce CPQ Software Eliminates Sales Hurdles?

    Blog in Salesforce, Salesforce Tools

    In this era of an automated CRM solution like Salesforce CPQ, if your sales team is still struggling in generating quotes, writing proposals and closing…

    automated CRM Solution, Automatic e-signature Integrations, Complex Products, Complex Sales, Configuration
    Ato Sep 29, 2021
    2,687  Views

    Popular Salesforce Videos

    Find Newly Created Fields in Salesforce

    Find Newly Created Fields in Salesforce

    Video in Salesforce Admin

    In this series, we do a deep dive into a specific business problem and share how one #AwesomeAdmin chose to solve it. Once you learn…

    Salesforce Training, Salesforce Tutorial, salesforce, Salesforce Learning, Object Manager
    Jogender Jul 19, 2022
    2,488  Views
    Salesforce Checkout: Manage Your Subscription & Buy Licenses

    Salesforce Checkout: Manage Your Subscription & Buy Licenses

    Video in Salesforce Training

    Watch this video to understand how to manage your Salesforce subscription and buy licenses on your own. This makes an easy process even easier, this…

    Salesforce Video, Salesforce Essentials, Salesforce Learning, Salesforce Checkout, Small Businesses
    Neha Yadav Sep 23, 2020
    2,157  Views
    Salesforce - How Small Businesses Offer Great Customer Service

    Salesforce - How Small Businesses Offer Great Customer Service

    Video in Others, Salesforce Stories, Sales

    Small businesses are more than capable of offering great customer service, even without having a big call center or multiple service agents on hand. For…

    salesforce, CRM, Salesforce Video, Customer Relationship Management, customer service
    Pooja Sep 7, 2020
    2,277  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.