Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

String encryption

Options
  • 11-09-2007 6:02pm
    #1
    Closed Accounts Posts: 45


    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;
    }
    


Advertisement