my $cipher = Crypt::CBC->new(-key=>$secret_key, -cipher => 'Rijndael'); my $cookie = MIME::Base64::encode_base64($cipher->encrypt("$usr:$pwd"), '');