Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  XML Module [Lea...  Decrypt Function
Previous Previous
 
Next Next
New Post 10/12/2006 4:03 AM
User is offline Sonal Panwar
1 posts
10th Ranked


Decrypt Function 

Hi,

I am using DNN's Encrypt and Decrypt functions. I'll explain my scenario: I have an id field which is first encrypted on a page and then this value is decrypted on another page.This id is a part of the url so its encrypted but when i replace  the encrypted value in the url with id value directly then also it works,which should not happen.What I mean is that the Decrypt function is not working properly. It returns the same value as given to it in the same way as it returns the encrypted value, i.e when i give the id directly then it should not return that id, rather it should return a value only for an encrypted value. I dont know the reason for this? Either I m going wrong somewhere or I am missing something. Any help??

Regards,

Sonal

 

 

 
New Post 10/15/2006 7:33 AM
User is offline Stefan Cullmann
1489 posts
6th Ranked








Re: Decrypt Function 
 sonal wrote

Hi,

I am using DNN's Encrypt and Decrypt functions. I'll explain my scenario: I have an id field which is first encrypted on a page and then this value is decrypted on another page.This id is a part of the url so its encrypted but when i replace  the encrypted value in the url with id value directly then also it works,which should not happen.What I mean is that the Decrypt function is not working properly. It returns the same value as given to it in the same way as it returns the encrypted value, i.e when i give the id directly then it should not return that id, rather it should return a value only for an encrypted value. I dont know the reason for this? Either I m going wrong somewhere or I am missing something. Any help??

Regards,

Sonal

Sonal, this is the wrong forum. I would like to advise using the developing forum instead. Nevertheless your question made me curious, so I played some few minutes to catch the answer.
Inside the decrypt function the input will be converted from base64 to a byteArray, if this method fails the fuction will return the original input string:

' convert data to byte array and Base64 decode
Dim byteData(strData.Length) As Byte
Try
  
byteData = Convert.FromBase64String(strData)
Catch ' invalid length
   strValue = strData
End Try

So the behaviour is by design. If you want to deny unencryted ids in your url, you can write code like:

dim id as string = decrypt(key, input_ID)
if id=input_id then ...'(throw exception)

 

 


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com

forms & Lists (UDT5.0) will be the next major release of the User Defined Table project.
A first Preview is available, though it requires DotnetNuke 5 (Beta 5).

Need to import external data to a UDT? Try http://www.codeplex.com/Csv2UDTImport

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  XML Module [Lea...  Decrypt Function
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Advanced Web Portals by Infoscaler
Infoscaler is a California based company that provides advanced Web Portals, E-commerce Sites, Database Applications and Intranet Solutions on the DotNetNuke and Microsoft.NET platforms.
www.infoscaler.com
DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
Overlook Technology
Website Development, DotNetNuke Consulting, Module Development, Portal Management
OverlookTechnology.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP