Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

How to encrypt

  • 12-09-2007 01:26AM
    #1
    Closed Accounts Posts: 1,444 ✭✭✭


    Hey,

    Anyone out there know how to encrypt a string in C#, compact framework, visual studio 2005?

    I'm trying to write a function something like:
    /*To be written in C#, Visual Studio 2005, Compact Framework*/
    private string encrypt(string plaintext_string){
    	string public_key="blah...blah...blah";	//public key
    	
    	...	//magic
    	
    	return encrypted_string;
    }
    

    I'm also trying to write encrypt/decrypt functions in PHP:
    /*To be written in PHP, version 4.4.7, mcrypt enabled*/
    function decrypt(string encrypted_string){
    	File private_key=new File("/path/to/private/key/");	//private key stored in a secure directory (e.g. .htaccess)
    	
    	...   //magic
    
    	private_key.destroy();		//somehow remove private key from memory once you're finished using it
    	return decrypted_string;
    }
    
    function encrypt(string plaintext_string){
    	string public_key="blah...blah...blah";
    	
    	...	//magic
    
    	return encrypted_string;
    }
    


Comments

Advertisement