The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

Code::Crypt::Graveyard - Encrypt you code with multiple nested keys

VERSION

version 0.001000

SYNOPSIS

print "#!/usr/bin/env perl\n\n" . Code::Crypt::Graveyard->new(
code => 'print "hello world!\n";',
builders => [
Code::Crypt->new(
get_key => q{ $] },
key => $],
cipher => 'Crypt::Rijndael',
),
Code::Crypt->new(
get_key => q{ $^O },
key => $^O,
cipher => 'Crypt::Rijndael',
),
Code::Crypt->new(
get_key => q{
require Sys::Hostname;
Sys::Hostname::hostname();
},
key => 'wanderlust',
cipher => 'Crypt::Rijndael',
),
],
)->final_code

DESCRIPTION

Code::Crypt::Graveyard leverages Code::Crypt to encrypt code in a nested fashion. This can help to keep what inner keys are a secret. In the example given in the "SYNOPSIS" the outermost key is the hostname. The inner keys are the operating system and the perl version. Of course, as with Code::Crypt, a technically proficient user that the code is targetted towards can likely remove all encryption entirely.

METHODS

final_code

my $code = $cc->final_code;

This method takes no arguments. It returns the compiled code based on the "ATTRIBUTES".

ATTRIBUTES

code

required. The code that will be encrypted.

builders

required. An arrayref of Code::Crypt objects that will encrypt the "code" recursively. Innermost is first.

SEE ALSO

Code::Crypt

AUTHOR

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.