From 2407f4b70ce3af2e85210089d87cb02eba7b9068 Mon Sep 17 00:00:00 2001 From: janw Date: Mon, 11 Feb 2008 10:53:15 +0000 Subject: [PATCH] removed duplicates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8822 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-bus | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/gosa-si/gosa-si-bus b/gosa-si/gosa-si-bus index f920f5a5b..3b5aa2a0d 100755 --- a/gosa-si/gosa-si-bus +++ b/gosa-si/gosa-si-bus @@ -466,41 +466,6 @@ sub create_passwd { } -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); -- 2.30.2