HighTechTalks DotNet Forums  

System.Security.Cryptography.ProtectedData

Dotnet Security microsoft.public.dotnet.security


Discuss System.Security.Cryptography.ProtectedData in the Dotnet Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Abhinav
 
Posts: n/a

Default System.Security.Cryptography.ProtectedData - 08-17-2007 , 10:51 AM






I was attempting to use this class however I do not see the ProtectedData class under System.Security.Cryptography. Any reason why!

This is what I have so far ...

Imports System.Security.Cryptography
Imports System.text.Encoding
Imports System

Public Class Security
Private Shared arrEntropybyte As Byte() = {1,2,3,4,5,6,7,8,9,0}

Public Shared Function Encrypt(ByVal stringToEncrypt As String) As String
Dim arrStringbyte As Byte()
Dim encryptedDBString As Byte()
Try
' Convert the string to a byte array:
arrStringbyte = Unicode.GetBytes(stringToEncrypt)
' Encrypt string
encryptedDBString = ProtectedData.Protect(stringToEncrypt, arrEntropybyte, DataProtectionScope.CurrentUser)
Catch ex As Exception
Throw ex
End Try
End Function
End Class


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.