Encryption Issues

I am currently working on a web application that requires encryption for fields. I have the EncryptByKey and DecryptByKey working fine when inputting/outputting from SQL Server 2008; however, I have found a minor glitch that I cannot seem to figure out how to fix. According to all documentation I have read, the max length of a string being input into the EncryptByKey function is 4000/8000 for a nvar/var char. If I put anything over 30 characters in, the field always gets truncated down to 30 characaters. This is not a major issue for most of the fields I am encrypting, but there is one field it is an issue. Any help is greatly appreciated. The following code is provided:

 

This part of the code is called on the record update from a code behind page. The field is getting encrypted properly, but it is getting truncated being put in.

ADMIN_EMAIL = EncryptByKey(Key_GUID('Encryption_Key'),convert(nvarchar,'" & txtemail.Text & "'))"

0
Haywire
5/3/2009 5:38:19 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

1 Replies
561 Views

Similar Articles

[PageSpeed] 45

Hi,

if your using Rjiendal Type of encryption then It may increasere The length of Encrypted Value..With increase in Size ofWords..

Example : A :- may encrypt for length of 10 words..

But :- BA :- may encrypted More 20 Words...

The Better way is encyptying file is x509certificate encryption Which Length of encyption remains same...
which is Aroung 172 in legth..

http://www.codeproject.com/KB/cpp/X509Certificate.aspx

u can check the above code..

hope it helps

 


Thanks
Avinash Tiwari

Remember to click “Mark as Answer” on the post, if it helps you.
0
qwe123kids
5/4/2009 7:59:24 AM
Reply:

Similar Artilces:

Sql Datasource issue
I have a simple form that accepts a zip code and a city when the submit button is hit this is triggered... Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click Dim Zip, City As String Zip = txtZip.Text City = txtCity.Text grdZipCodes.DataSourceID = "ZipSearch" ZipSearch.SelectParameters("ZipCode").DefaultValue = Zip ZipSearch.SelectParameters("City").DefaultValue = City grdZipCodes.DataBind() End Sub This is supposed to populate a gridview with filtered data.  Instead I get nothing, even though in query analyzer  if I ...

Converting a gridView using an Sql Datasource to a gridview who is not using an SQL DataSource
How can i rewrite this page so that i doesnt make use of an SqlDataSource?  <%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginHistory.ascx.cs" Inherits="Private_UserControls_WebUserControl" %> <html> <head> <%--<link rel="stylesheet" href="BaldwinPortal.css" mce_href="BaldwinPortal.css" type="text/css" />--%> <title>Login History</title> </head> <body style="margin:0 0 0 0;padding:0 0 0 0"> ...

ADO.NET/SQL Connection issues
Hi All, I am having some isues with a web form, it loads but the .cs file does not populate the dropdownlist in the form. Any sugestion? This is urgent.     Please post your code...I think it would be easier to help you if we could see where the problem is. using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Net.Mail; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Data.Sq...

SQL, Querystring, .NET issue is killing me.
i don't know why this is such a problem, but its making me crazy. ISSUE: I am passing a date and a name to selectTime.aspx via the querystring. on selectTime.aspx, i have a sqlDataSource that is SUPPOSED to run a stored procedure, passing values from the querystring. well... it don't work.  I can put a little code in the page load and print out the querystring values, so i KNOW they are making it to the new page. Instead I get a SQL server error: [ODBC SQL Server Driver][SQL Server]Procedure 'cld_web_conf_SelectTime' expects parameter '@dtRoomDate', which was not supp...

SQL 2000 Indexing and .NET issue
I got in a conversation with another person about MS SQL 2000 server and .NET. According to this guy for some reason they didn't work well together (database indexing issues) and there were better 3rd party indexing tools. Anyone heard anything about this? Thanks, Trey Huh? That's nonsense. MS designed the data features of .NET to be tightly integrated with SQL Server, and Whidbey is only going to make things better. Besides, what does db indexing have to do with client-side code? Does the person have any details, or are there just generalities? DonDon Kiely, MCP, MCSDIn the ...

.Net Connector 5.0 Encryption vs .Net Connector 5.1 Encryption
Is there any different between the AES Encryption in .Net Connector 5.0 and .Net Connector 5.1 ?? previously i using .Net Connector 5.0 to build my system. the encryption and descryption work fine. but after i upgrade to .Net Connector 5.1 ( uninstall the .Net 5.0 Connector, Install 5.1, delete the "<add assembly="MySql.Data, Version=5.0.7.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>" in webconfig, then add the 5.1 MySQL reference to the system) i cant encrypt the data that i previously decrypt when using .Net Connector 5.0. What is the problem that ca...

Best method for handling issue(SQL and .net)
 Ok,Here is the issue I am trying to solve with my ideas ,I am sure there is a better way to do this.....There a 2 SQL databases on the same server(TestA and TestB)(BoxA)Both DB have more than 20 tables each.I am only concenred about the query and idea...My requirement is to query TestA for records normally between 100-500 rows of data.This data contains an id integer filed that links to Database TestB and a table within it.Now the process that I am sure can be done better.Windows Service on Box B queries every hour to get rows of Data from TestA....Service takes thoses rows and the que...

SQL DataSource SelectCommand Issues BIG TIME !
Well, Im about ready to snap. I "upgraded" my code from Beta 1 to Beta 2 , Now on EVERY postback the SqlDataSource SelectCommand reverts to what was used on the interface side code. even thought I am setting it to something else, On about 80% of my SqlDataSource objects at somepoint in the page lifecycle I clear the paramaters and reset the SelectCommand. Like so, Me.SqlDataSource1.SelectCommand = "Select * From Book where Binding='" & Me.TextBox1.Text & "';" (I use paramaters, I just didnt for the Demonstration, it breaks either way) Now on firstpostback it works fine, but ...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

Outer Joins Issue with DW.net 2.0 and SQL Server 2000
Is there a problem with using outer joins in DataWindow.net. I'm using DataWindow.net 2.0, MS SQL Server 2000. I'm getting an error that the table does not exist. If I turn off the outer join, the table exists. I can paint the query using the graphical view, with no problem. But when I return to retrieve the data, it says that the table that is on the right of the join does not exist. Make it a straight join, and it works. I've seen similar problems with Outer Joins on PB 10 and SQL Server 2000. A Datawindow (not .NET) worked fine in PB 7, but not in PB 10. Take away th...

Transact-SQL issues with SQL Anywhere...
Hello, I am trying to write a stored procedure that I can use in SQL Anywhere AND in Sybase ASE. I am having compatability issues with Watcom-SQL versus Transact-SQL. I don't think the following Watcom-SQL procedure can be written in transact-SQL in such a way so that it can be used in both environments (ASA and ASE). WATCOM-SQL: alter procedure "DBA".sp_RebuildKeyPool_copy() begin declare nextid integer; set nextid=0; truncate table s_keypool; for eachdatabaseid as databaseidcursor dynamic scroll cursor for select database_id as currdatabaseid ...

compatability issue between T-SQL and WATCOM- SQL
Hi all, Iam using ASA 8.0.2.4542. I created function as following in Watcom-sql Alter function my_function() RETURNS numeric(10,2) DETERMINISTIC BEGIN DECLARE @return_name numeric(10,2); SET @return_name = 10.2; SET @return_name; END If above function executed in watcom - SQL then return value is 10.2 but above function is modified to Transact - SQL (T-SQL) and executed then returns value is integer only. i,e 10 please let me know how can i get 10.2 as a return value in Transact- SQL (T-SQL) ? Thanks in advance. How about posting the T-SQ...

DW.NET support for SQL Anywhere .NET provider
Hello, we are trying to get DW.NET (v. 2.5) working with Sybase SQL Anywhere .NET provider for database access. Does anybody know if that is possible, and if so, then how? The reason for this question is that we are evaluating DW.NET as a solution for document printing from our existing C# application which uses SQL Anywhere .NET provider. I would expect that these two products should work together, as they are both developed by Sybase and targeted for the same .NET platform. Linas ...

issue on Net::LDAP sasl issue on windows 2000.
--=_alternative 005EA9BE85256E71_= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: webdurai@webdurai.com Here is a simple script ... i am having very hard time here... This is my program use Net::LDAP qw(LDAP=5FSUCCESS LDAP=5FPROTOCOL=5FERROR); use Authen::SASL; use Net::LDAP::Util qw(ldap=5Ferror=5Fname ldap=5Ferror=5Ftext); sub lConnect { my $server =3D shift; print " the server name is $server\n"; my $ldap =3D Net::LDAP->new($server, port=3D> 389, version =3D> 3); ...

VS .NEt 2003/ .Net 1.1 issues
Hi, I have a couple of issues with VS 2003/1.1 development on a machine.  I have no problems working with VS 2005/2.0 on the very same machine.   When creating a Web Application on my localhost IIS install, as soon as the WebForm1.aspx is created I get an ExecutionEngineException in DefaultDomain and the IDE closes.   Thinking that this could be an IDE issue, I attempted to install VS 2003 SP1.  When I try that, I get a Fatal Execution Engine Error 0x7925dc14. I have googled that error and it seems to come up in the context of some other applications a...

Web resources about - Encryption Issues - asp.net.sql-datasource

Encryption - Wikipedia, the free encyclopedia
For technical reasons, an encryption scheme usually uses a pseudo-random encryption key generated by an algorithm. It is in principle possible ...

REPORT: Facebook’s Outdated Web Encryption Technology May Have Enabled Prism
Facebook still uses encryption keys with 1,024-bit lengths, while the industry standard used by Internet companies — including Apple, Microsoft, ...

Search Twitter - encryption
Sign in Sign up Search Refresh Tech Investor News @ TechInvestNews 2m Secusmart puts its BlackBerry encryption chip to work on the desktop (Netflash) ...

Hide Text - Text encryption and secret messages on the App Store on iTunes
Get Hide Text - Text encryption and secret messages on the App Store. See screenshots and ratings, and read customer reviews.

Paris attacks fuel encryption debate
Assaults prompt renewed government push for Silicon Valley to open up systems.

ProtonMail: banning encryption won't stop terrorism
... similar atrocities happening in future. As well as calls for an increase in online surveillance , politicians have also suggested that encryption ...

Apple, Google, Facebook and Microsoft warn weaker encryption makes the bad guys stronger
... stance on encrypted Internet-connected products and services. But government officials aren’t the only ones to voice concerns about encryption. ...

ISIS Is Using Everything From Encryption To PlayStations To Avoid Being Spied On
But the larger problem, according to intelligence officials, is what happens when ISIS stops using technology at all.

Feinstein: The Achilles heel in the internet is encryption - Videos - CBS News
Senate Intelligence Committee member Sen. Dianne Feinstein, D-California, says that the biggest obstacle the intelligence community faces is ...

On encryption, Clinton tells Silicon Valley to be a team player
Democratic presidential candidate tells tech companies they need to help track down terrorists but stops short of calling for weaker encryption. ...

Resources last updated: 11/29/2015 2:06:03 PM