Local variable protection

From: Date: Wed, 12 Oct 2011 20:06:34 +0000
Subject: Local variable protection
Groups: php.general 
Request: Send a blank email to php-general+get-315255@lists.php.net to get a copy of this message
Are there any assurances that function local variables are protected from code calling the function? For example, I would like to provide some cryptographic functions such as function org_secure_string($string) { $org_key = "a very random key"; return hash($string, $key); } function org_reveal_string($hash) { $org_key = "a very random key"; return unhash($hash, $key); } I'd like to protect $org_key from any code following or using these functions. I've not yet found a way that it can be revealed, but I wonder if anyone here can give me a definitive answer whether or not it is possible. Ben

« previous php.general (#315255) next »