summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 37ce7ba)
raw | patch | inline | side by side (parent: 37ce7ba)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 15:48:01 +0000 (15:48 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 15:48:01 +0000 (15:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8027 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/daemon/gosa-sc | patch | blob | history | |
contrib/daemon/gosa-sd | patch | blob | history | |
contrib/daemon/gosa-sd-bus | patch | blob | history |
diff --git a/contrib/daemon/gosa-sc b/contrib/daemon/gosa-sc
index 6167310bdd7eed4fd5302a940359f5a7b8ef9e4e..a626f2c36b36d6c16807dce044c7f782a8873ec6 100755 (executable)
--- a/contrib/daemon/gosa-sc
+++ b/contrib/daemon/gosa-sc
#===============================================================================
sub create_ciphering {
my ($passwd) = @_;
- my $passwd_length = length($passwd);
- my $multiplier = int($passwd_length / 32) + 1;
- my $extension = 32*$multiplier - $passwd_length;
- $passwd = substr(0,32, 32x$passwd);
+ $passwd = substr("$passwd"x32, 0, 32);
my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
return $my_cipher;
diff --git a/contrib/daemon/gosa-sd b/contrib/daemon/gosa-sd
index 18583f10942f9b7abcb4d3c5735ecd604a4896a6..b02c314171ccca0898288ece556b2ac6738796e3 100755 (executable)
--- a/contrib/daemon/gosa-sd
+++ b/contrib/daemon/gosa-sd
#===============================================================================
sub create_ciphering {
my ($passwd) = @_;
- my $passwd_length = length($passwd);
- my $multiplier = int($passwd_length / 32) + 1;
- my $extension = 32*$multiplier - $passwd_length;
- $passwd = substr(0,32, 32x$passwd);
+ $passwd = substr("$passwd"x32, 0, 32);
my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
return $my_cipher;
index dd9d3d4489168ff33d4fd79ff2dfefbe96b8e278..5235c0e07694681985156c6d91144382890e10a4 100755 (executable)
#===============================================================================
sub create_ciphering {
my ($passwd) = @_;
- # passwd has to be of multiple length of 32, depend on Crypt::Rijndael::MODE_CBC
- my $passwd_length = length $passwd;
- my $multiplier = int($passwd_length / 32) + 1;
- my $extension = 32*$multiplier - $passwd_length;
- $passwd = substr(0,32, 32x$passwd);
+ $passwd = substr("$passwd"x32, 0, 32);
my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC );
return $my_cipher;
}