DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 17 Aug 2007 09:51:14 -0500,    posted on: microsoft.public.dotnet.security        back       

Thread Index
  1    Abhinav


System.Security.Cryptography.ProtectedData   
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
Date:Fri, 17 Aug 2007 09:51:14 -0500   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us