summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d2d3cf5)
raw | patch | inline | side by side (parent: d2d3cf5)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Feb 2008 10:53:15 +0000 (10:53 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 11 Feb 2008 10:53:15 +0000 (10:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8822 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-bus | patch | blob | history |
diff --git a/gosa-si/gosa-si-bus b/gosa-si/gosa-si-bus
index f920f5a5be4a1a63f59d5981670900bc9ca725c2..3b5aa2a0dda3609b049a40099863adbda7a822f8 100755 (executable)
--- a/gosa-si/gosa-si-bus
+++ b/gosa-si/gosa-si-bus
}
-sub create_ciphering {
- my ($passwd) = @_;
- $passwd = substr(md5_hex("$passwd") x 32, 0, 32);
- my $iv = substr(md5_hex('GONICUS GmbH'),0, 16);
- my $my_cipher = Crypt::Rijndael->new($passwd , Crypt::Rijndael::MODE_CBC());
- $my_cipher->set_iv($iv);
- return $my_cipher;
-}
-
-
-sub encrypt_msg {
- my ($msg, $key) = @_;
- my $my_cipher = &create_ciphering($key);
- {
- use bytes;
- $msg = "\0"x(16-length($msg)%16).$msg;
- }
- $msg = $my_cipher->encrypt($msg);
- chomp($msg = &encode_base64($msg));
- # there are no newlines allowed inside msg
- $msg=~ s/\n//g;
- return $msg;
-}
-
-
-sub decrypt_msg {
- my ($msg, $key) = @_ ;
- $msg = &decode_base64($msg);
- my $my_cipher = &create_ciphering($key);
- $msg = $my_cipher->decrypt($msg);
- $msg =~ s/\0*//g;
- return $msg;
-}
-
-
sub send_msg_hash2address {
my ($msg_hash, $address, $encrypt_key) = @_ ;
my $msg = &create_xml_string($msg_hash);