Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. decrypt the dataset

decrypt the dataset

Scheduled Pinned Locked Moved Windows Forms
databasehelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikas shukla
    wrote on last edited by
    #1

    hi sir i am using following code for encrypt my textbox value and save it in encrypted form to our database. Public function encrp(ByVal enc As String) As String Dim ctr As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(enc) Dim c As String = System.Convert.ToBase64String(ctr) Return c End function and following code for decrypt the value for showing in textbox Public function decryp(ByVal c As String) As String Dim b1 As Byte() = System.Convert.FromBase64String(c) Dim f As String = System.Text.ASCIIEncoding.ASCII.GetString(b1) Return f End function but sir i am unable to decrypt my dataset with the help of this function to show the record in datagridview.so please help me for decrypt the dataset.

    D 1 Reply Last reply
    0
    • V vikas shukla

      hi sir i am using following code for encrypt my textbox value and save it in encrypted form to our database. Public function encrp(ByVal enc As String) As String Dim ctr As Byte() = System.Text.ASCIIEncoding.ASCII.GetBytes(enc) Dim c As String = System.Convert.ToBase64String(ctr) Return c End function and following code for decrypt the value for showing in textbox Public function decryp(ByVal c As String) As String Dim b1 As Byte() = System.Convert.FromBase64String(c) Dim f As String = System.Text.ASCIIEncoding.ASCII.GetString(b1) Return f End function but sir i am unable to decrypt my dataset with the help of this function to show the record in datagridview.so please help me for decrypt the dataset.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You call converting a string to Base64 encrypted? That's not encrypted at all. The code is correct as far as I can see. You're going to have to double-check what you're passing into each method and what you're getting back.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      V 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You call converting a string to Base64 encrypted? That's not encrypted at all. The code is correct as far as I can see. You're going to have to double-check what you're passing into each method and what you're getting back.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        V Offline
        V Offline
        vikas shukla
        wrote on last edited by
        #3

        hi sir , send code in decrypted dataset in database please sir

        D 1 Reply Last reply
        0
        • V vikas shukla

          hi sir , send code in decrypted dataset in database please sir

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          No, I'm not giving you any code. You've already got the code that does the job. For some reason, you've either not following what youre passing into the encryption/decryption methods or you're not storing or retrieving the data from the database properly.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008
          But no longer in 2009...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups