|
Dim d As New EncryptedData
d.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES
d.Content = "hello"
d.SetSecret("23456", CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD)
Dim textenc As String = d.Encrypt(CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64)
Response.Write(textenc)
Dim d1 As New EncryptedData
d.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES
d.SetSecret("23456", CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD)
d.Decrypt(textenc)
Dim textdec As String = d.Content()
Response.Write(textdec)
Try the above , the value given as string in the function SetSecret is the key I am using , u can use anything. Add a reference to Capicom in ur project and then implement the same
|
|
|
|
|
Hi thanks,
I couldn't able to implement this in asp.net c# can you help me.
alex.
|
|
|
|
|
string strencrypteddata="";
EncryptedData encryptdata = new EncryptedDataClass();
encryptdata.Algorithm.Name = CAPICOM.CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES;
encryptdata.Algorithm.KeyLength = CAPICOM.CAPICOM_ENCRYPTION_KEY_LENGTH.CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM;
encryptdata.SetSecret("dasdsads",CAPICOM.CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD);
encryptdata.Content = "hello";
strencrypteddata = encryptdata.Encrypt(CAPICOM.CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64);
decryption ::::
string strencrypteddata1;
EncryptedData encryptdata1 = new EncryptedDataClass();
encryptdata1.Algorithm.Name = CAPICOM.CAPICOM_ENCRYPTION_ALGORITHM.CAPICOM_ENCRYPTION_ALGORITHM_3DES;
encryptdata1.Algorithm.KeyLength = CAPICOM.CAPICOM_ENCRYPTION_KEY_LENGTH.CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM;
encryptdata1.SetSecret("dasdsads",CAPICOM.CAPICOM_SECRET_TYPE.CAPICOM_SECRET_PASSWORD);
encryptdata1.decrypt(strencrypteddata );
Response.Write(encryptdata1.Content);
|
|
|
|
|
Hi
sorry for the disturbance..
how can i declare this
EncryptedData encryptdata = new EncryptedDataClass();
i coudn't able to
is there specific name space is needed
i added
using System.Security.Cryptography;
but still problem
pls help me
alex
|
|
|
|
|
I had written in the first mail itself to add a reference to Capicom in ur solution and then write using Capicom and then u will b able to use this code
|
|
|
|
|
sorry i am confucing,
From where i will add reference to my project...i mean Capicom..
alex
|
|
|
|
|
I suppose u have ur solution opened in front of u , You will be able to see a references folder , right click , add reference . Click on the COM tab and there look for Capicom. select the same and then it will appear in the references folder in ur solution. Now in ur page add the line using Capicom.
Is it ok now
|
|
|
|
|
Hello
I didn't found anything in the com tag named Capicom
i am using .net 2.0 ...sorry for the disturbance.
alex.
|
|
|
|
|
Please follow this link and register the Capicom.dll in your system32 . this link gives u a download of the same
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en</a>[<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=860ee43a-a843-462f-abb5-ff88ea5896f6&DisplayLang=en" target="_blank" title="New Window">^</a>]
|
|
|
|
|
How i can display all the countries and based on each country that particular states in two comboboxes.instead of saving all states in database any built in class is there?
|
|
|
|
|
hi anujose,
if you want to fetch any data then you have to read any database or file...
here you dont want to fetch data from database thenyou can fetch data from XML file..
prepare some structure in XML like..
<country>
<countryname>INDIA
<countrycode>IN
<state>St1
<state>St2
.
.
.
and then read this XML and bind that datatable with your controls...
Bye have a nice day...
Chirag Patel
|
|
|
|
|
hi anujose,
if you want to fetch any data then you have to read any database or file...
here you dont want to fetch data from database thenyou can fetch data from XML file..
prepare some structure in XML like..
<Country>
<CountryName>INDIA</CountryName>
<CountryCode>IN</CountryCode>
<State>St1</State>
<State>St2</State>
.
.
.
</Country>
and then read this XML and bind that datatable with your controls...
Bye have a nice day...
Chirag Patel
|
|
|
|
|
i don't want to save the list of all countries by hand in anywhere
|
|
|
|
|
Then where yo want to store you must have to store the data you want to display
You can't show it on fly ...........
Whats your idea ? how you want to implement it ? what is the problem in storing the data ?
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
Ok let the end user type his/her country
Thomas
|
|
|
|
|
then you can create user control and use it in databinding...i think you will not find any third party control exactly same as your requirement..
bye
Chirag Patel
|
|
|
|
|
Hi,
I have a batch file(test.bat) i wrote a command to rename a text file in this batch file. Both batch file and text files are in Network Shared Drive. I am trying to run that batch file from ASP.NET application using VB.NET as a code behind. The following is the code i wrote,
Dim p as new ProcessStartInfo
p.WorkingDirectory = "\\networkSharedDrive\SharedFolder\"
p.FileName = "testcab.bat"
p.UseShellExecute = True
Process.Start(p)
This code is executing fine, It is not giving any error also. But the text file name is not changing. When i directly double clicking on that Batch file the name of the text file is changed that means, batch file is executing fine. But Through the above code it is not working.....
Any ideas....pls help me......
Vijay Kumar
|
|
|
|
|
Hello Vijay,
Earlier I was also stuck on this issue. What I have figured out was that there were some unattended processes which are making this happen. I tried a lot however was unable to resolve this issue. There is a nice workaround available on this link:
http://codebetter.com/blogs/brendan.tompkins/archive/2004/05/13/13484.aspx
This workaround has always worked at my end and I hope so it will work for you also.
Regards,
Amit Pal
|
|
|
|
|
How can I get Application Settings Key Values of web.config through Java Script?
Please any one help...
|
|
|
|
|
You can't.
You have to get the value in the server code, and either create Javascript code that recreates the value, or put it in a hidden field where the Javascript can access it.
---
single minded; short sighted; long gone;
|
|
|
|
|
You need to read it in the codeBehind to a protected variable like
protected string strAppTitle = ConfigurationSettings.AppSettings["AppTitle"];
Then in the JavaScript, you can use
var strAppTitle = "<%=strAppTitle%>" ;
|
|
|
|
|
Use AJAX to call a server function for getting the values from web.config
Thomas
|
|
|
|
|
Hi All,
Have any one worked on paypal integration. I need IPN Code. I mean how to Update Database after complete Transaction.
Please Help
Thanks in Advance.
|
|
|
|
|
Dear All,
I am making web application using Asp.net C#(Visual Studio2005).
i am facing problem while generating report in local mode. i explain what i did.
i fetched the data to dataset(dataset1.xsd). i made report( through add new item -> report named it report.rdlc) now in new aspx page i placed dropdownlist and button(to run the report). and reportviewer to show the report. sometime it execute the output but some time its show the following error like
• An error has occurred during report processing.
o Exception has been thrown by the target of an invocation.
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
Even through i execute Sp with that veriable . it show the output .
What is the problem .
please help
thanks
regards
imran khan
|
|
|
|
|
is it possible to create a table in database and specify its columns dynamically at run time through programming and how.please reply if you have any idea regarding this
thanx
prashant jain malviya national institute of technology
|
|
|
|