summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d774b4)
raw | patch | inline | side by side (parent: 9d774b4)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 16:34:07 +0000 (16:34 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Dec 2007 16:34:07 +0000 (16:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8029 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 a626f2c36b36d6c16807dce044c7f782a8873ec6..c8cd0f04ad6f8cb1d44ea870718ba543adb635a1 100755 (executable)
--- a/contrib/daemon/gosa-sc
+++ b/contrib/daemon/gosa-sc
my $msg_length = length($msg);
my $multiplier = int($msg_length / 16) + 1;
my $extension = 16*$multiplier - $msg_length;
- $msg = $msg."\0"x$extension;
+ $msg = "0"x$extension.$msg;
my $crypted_msg = $my_cipher->encrypt($msg);
#my $crypted_msg = $msg;
return $crypted_msg;
sub decrypt_msg {
my ($crypted_msg, $my_cipher) =@_;
my $msg = $my_cipher->decrypt($crypted_msg);
- $msg =~ s/\0*$//gi;
- $msg =~ s/\0$//gi;
+ $msg =~ s/^0*$//g;
return $msg;
}
diff --git a/contrib/daemon/gosa-sd b/contrib/daemon/gosa-sd
index 613987bad545aa1ad86014d51eb4673c46a1fe60..ed72ccc5e0a23f8e03505c08568bd960b9bcbcc0 100755 (executable)
--- a/contrib/daemon/gosa-sd
+++ b/contrib/daemon/gosa-sd
my $msg_length = length($msg);
my $multiplier = int($msg_length / 16) + 1;
my $extension = 16*$multiplier - $msg_length;
- $msg = $msg."\0"x$extension;
+ $msg = "0"x$extension.$msg;
my $crypted_msg = $my_cipher->encrypt($msg);
#my $crypted_msg = $msg;
return $crypted_msg;
sub decrypt_msg {
my ($crypted_msg, $my_cipher) = @_ ;
my $msg = $my_cipher->decrypt($crypted_msg);
- $msg =~ s/\0*$//gi;
+ $msg =~ s/^0*//g;
return $msg;
}
index 5235c0e07694681985156c6d91144382890e10a4..f4282e39d138a0c7b95249a912fd2c5aab33b8ed 100755 (executable)
my $msg_length = length($msg);
my $multiplier = int($msg_length / 16) + 1;
my $extension = 16*$multiplier - $msg_length;
- $msg = $msg."\0"x$extension;
+ $msg = "0"x$extension.$msg;
my $crypted_msg = $my_cipher->encrypt($msg);
#my $crypted_msg = $msg;
return $crypted_msg;
my ($crypted_msg, $my_cipher) =@_;
my $len = length $crypted_msg;
my $msg = $my_cipher->decrypt($crypted_msg);
- $msg =~ s/\0*$//gi;
- $msg =~ s/\0$//gi;
+ $msg =~ s/^0*//g;
return $msg;
}