Allow to set the encryption length in lutim.conf

This commit is contained in:
Luc Didry
2015-10-08 11:35:11 +02:00
parent 1dff747b64
commit 1082f42682
3 changed files with 18 additions and 12 deletions
+1
View File
@@ -17,6 +17,7 @@ Revision history for Lutim
- Add file extension to view link
- Add list of user's images in localStorage and a page to list the user's images
- Use cryptographically secure random generator
- Allow to set the encryption length in lutim.conf
- bugfixes
0.6 2014-10-03
+13 -12
View File
@@ -19,17 +19,18 @@ sub startup {
my $config = $self->plugin('Config', {
default => {
provisioning => 100,
provis_step => 5,
length => 8,
always_encrypt => 0,
anti_flood_delay => 5,
tweet_card_via => '@framasky',
max_file_size => 10*1024*1024,
https => 0,
default_delay => 0,
max_delay => 0,
token_length => 24,
provisioning => 100,
provis_step => 5,
length => 8,
always_encrypt => 0,
anti_flood_delay => 5,
tweet_card_via => '@framasky',
max_file_size => 10*1024*1024,
https => 0,
default_delay => 0,
max_delay => 0,
token_length => 24,
crypto_key_length => 8,
}
});
@@ -187,7 +188,7 @@ sub startup {
my $upload = shift;
my $filename = shift;
my $key = $c->shortener(8);
my $key = $c->shortener($c->config('crypto_key_length'));
my $cipher = Crypt::CBC->new(
-key => $key,
+4
View File
@@ -25,6 +25,10 @@
# optional, default is 8
#length => 8,
# length of the encryption key
# optional, default is 8
#crypto_key_length => 8,
# how many URLs will be provisioned in a batch ?
# optional, default is 5
#provis_step => 5,