?
Solved

XOR Encryption (Decryption) using SSRS

Posted on 2009-05-19
3
Medium Priority
?
957 Views
Last Modified: 2012-05-07
I am using XOR encryption to encrypt a value.  I want the value to show up in a SSRS report, how do I decrypt it using SSRS (Sql Server Reporting Services)?  Below is the code for encryption
Public Shared Function XOREncryption(ByVal key As String, ByVal value As String) As String
            Dim intXORValue1 As Integer
            Dim intXORValue2 As Integer
            Dim strDataOut As String = ""
 
            For lonDataPtr As Long = 0 To (value.Length - 1)
                intXORValue1 = Asc(value.Substring(lonDataPtr, 1))
                intXORValue2 = Asc(key.Substring(lonDataPtr Mod key.Length, 1))
                If (intXORValue1 = intXORValue2) Then
                    strDataOut &= Chr(intXORValue2)
                Else
                    strDataOut &= Chr(intXORValue1 Xor intXORValue2)
                End If
            Next lonDataPtr
 
            Return strDataOut
        End Function

Open in new window

0
Comment
Question by:Perfect10Sat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:Perfect10Sat
ID: 24432611
None of these answer my question, they just say how to do XOREncryption which I already have completed with the attached code..  I need to know how to do it in a SQL Reporting Service report..
0
 

Accepted Solution

by:
Perfect10Sat earned 0 total points
ID: 24433287
Figured it out, put the code above from me in the "Report Properties", Tab "Code".

Then call it like the following..

="Field decrypted is: "+code.XOREncryption("Key",Fields!DbField.Value)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A recent question popped up and the discussion heated up regarding updating a COMMENTS (TXT) field in a table using SSRS. http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/MS-SQL_Reporting/Q_27475269.html?cid=1572#a37227028 (htt…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question