index 496ce8d4edb0d015cff3f794aef0bd5473bdfec4..270666e7992b52c0e16992812ace61e1eb2bad13 100644 (file)
sub encrypt_msg {
my ($msg, $my_cipher) = @_;
if(not defined $my_cipher) { print "no cipher object\n"; }
- $msg = "\0"x(16-length($msg)%16).$msg;
+ {
+ use bytes;
+ $msg = "\0"x(16-length($msg)%16).$msg;
+ }
$msg = $my_cipher->encrypt($msg);
chomp($msg = &encode_base64($msg));
&add_content2xml_hash($out_hash, $key, $value);
}
}
-
- &send_msg_hash2address($out_hash, $to, $hostkey);
+ my $out_msg = &create_xml_string($out_hash);
+ return $out_msg;
}
sub get_where_statement {
- my ($msg, $msg_hash)= @_;
+ my ($msg, $msg_hash) = @_;
my $error= 0;
my $clause_str= "";
- if( (not exists $msg_hash->{'where'}) || (not exists @{$msg_hash->{'where'}}[0]->{'clause'}) ) { $error++; };
+ if( (not exists $msg_hash->{'where'}) || (not exists @{$msg_hash->{'where'}}[0]->{'clause'}) ) {
+ $error++;
+ }
+
if( $error == 0 ) {
my @clause_l;
my @where = @{@{$msg_hash->{'where'}}[0]->{'clause'}};