in reply to making perl more forgetting
and then undef $sensitive_code; when you want to clean up (followed by a lot of miscellanous code to allocate different sizes of blocks of memory and wipe them). But it's going to be pretty difficult to guarantee success. I'd resort to XS or Inline::C for this.$sensitive_code = eval 'sub { my ($foo,$bar,$baz) = @_; $sensitive = "D-$foo-$bar-$baz"; # do stuff with $sensitive return; }'; $sensitive_code->("charanga","Boom","BANG");
Update: actually, not sure you need the eval to get/clear a fresh pad.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: making perl more forgetting
by nothingmuch (Priest) on May 16, 2004 at 19:57 UTC | |
by diotalevi (Canon) on May 17, 2004 at 11:30 UTC | |
by ysth (Canon) on May 17, 2004 at 11:47 UTC | |
by diotalevi (Canon) on May 17, 2004 at 13:43 UTC |