09-18-2013, 04:54 PM
Pages: 1 2
09-20-2013, 11:45 PM
Additional information - because of some bug in firmware, first of all put something like 11111 or something else to the Common/Mac file AES Encryption key field and make apply. Then put a real key in this fields.
04-05-2015, 07:27 AM
Here is the same algorithm written in perl. Key supplied as argument (must be 16 characters) and config file fed into stdin, encrypted file is printed to stdout.
Code:
#!/usr/bin/perl -w
use Crypt::Mode::ECB;
my $key = $ARGV[0]; # length has to be 16 characters
my $plaintext = do { local $/; <STDIN> };
# Pad to a multiple of 16 (128 bits) with spaces
my $pad=(16-(length($plaintext) % 16)) % 16;
for (my $n=0; $n<$pad; $n++) {
$plaintext .= ' ';
}
my $c = Crypt::Mode::ECB->new('AES', 0);
print($c->encrypt($plaintext, $key));
Pages: 1 2