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

    Platform Events

    Learn About Platform Events in Salesforce

    Blog in Others, Salesforce Apex

    Stage Event depends on Event-Driven Architecture which empowers applications to convey inside and outside of Salesforce.  Stage occasions depend on the distribute/buy-in model and work…

    Apex Tests, Apex Triggers, Applications, Business Cycle, Business Situations
    Manish Jun 17, 2021
    6,020  Views
    Experience Cloud

    Salesforce Experience Cloud – Possibilities, Cost, and Facts

    Blog in Salesforce Cloud Platform

    Thinking about building a portal for your own customers or dealers? Here’s the inside scoop on some important facts you should understand and know about…

    Booking Portals, Building a Portal, Business Model, Channel Management, Collaboration Channels
    Melonleaf Sep 16, 2021
    2,788  Views
    Salesforce Blockchain

    Introducing Salesforce Blockchain: World’s No.1 CRM Moves into Blockchain with its own Platform

    Blog in Salesforce Products

    Salesforce just got done with TrailheaDX 2019 this weekend. Algoworks was at TDX19 too, and oh boy, did we have fun! There was a bunch…

    App Data, Blockchain, Blockchain Issues, Blockchain Networks, CRM
    Algoworks Aug 17, 2019
    3,073  Views

    Popular Salesforce Videos

    Salesforce Field Service Basics | Salesforce Webinar

    Salesforce Field Service Basics | Salesforce Webinar

    Video in Salesforce Field Service Platform

    Salesforce Field Service is a cloud-based platform that enables businesses to manage and automate their customer service operations. From customer contact management, and call routing…

    Salesforce Field Service Platform, Salesforce Field Service, Field Service Management, Field Service, Field Service Mobile App
    AblyPro Jul 1, 2024
    516  Views
    Salesforce Heroku Integration | Heroku Connect

    Salesforce Heroku Integration | Heroku Connect

    Video in Salesforce Integration

    Heroku is a cloud platform that lets deploy, run and manage applications and websites. It is part of Salesforce Platform. This video will explain about…

    Salesforce Training, Salesforce Tutorial, salesforce platform, Salesforce Video, Salesforce Learning
    Jogender Jul 26, 2021
    4,808  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,724  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.