Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am using Xamarin IDE to develop an Android app using c#.

I am using Mono.Security.X509 namespace
I want to encode and decode data using Mono.Security.X509.
Any Help plz!

[edit from OP]
how to encode a string using Mono.Security.X509

Code:

C#
byte[] certBytes = new byte[5] { 1,2,3,4,5 };			
MonoX509.X509Certificate rootCert = new MonoX509.X509Certificate(certBytes);
MonoX509.X509Store store = MonoX509.X509StoreManager.CurrentUser.TrustedRoot;
store.Import(rootCert);

but this throwns an exception

Input Data cannot be coded as a valid certificate
Posted
Updated 17-Jul-13 23:56pm
v2
Comments
Richard MacCutchan 18-Jul-13 5:06am    
What sort of help? If you have a technical problem please update your question with the details.
rohit24c 18-Jul-13 5:41am    
Moved to original question
Richard MacCutchan 18-Jul-13 5:59am    
The exception message seems quite clear. Read the documentation for that method to find out why.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900