Fwd: error in crypo module

johnpaul ci <>
Tue Jul 6 05:53:25 CEST 2010


---------- Forwarded message ----------
From: johnpaul ci <>
Date: Mon, 5 Jul 2010 00:53:41 -0400
Subject: Re: ex11 usage
To: Joe Armstrong <>

Hello


This time I am sending you another errot encountered when using the
crypto moduke in erlang. I have installed the package erlang-crypto
and some its functions are working well. The following errors occured
when tried to run the functions of DES encryption.

3>Key = <<16#01,16#23,16#45,16#67,16#89,16#ab,16#cd,16#ef>>.
<<1,35,69,103,137,171,205,239>>
4> IVec = <<16#12,16#34,16#56,16#78,16#90,16#ab,16#cd,16#ef>>.
<<18,52,86,120,144,171,205,239>>
5> P = "Now is the time for all ".
"Now is the time for all "
6> C = crypto:des_cbc_encrypt(Key, IVec, P).
** exception error: bad argument
     in function  port_control/3
        called as port_control(crypto_drv02,13,
                               [<<1,35,69,103,137,171,205,239>>,
                                <<18,52,86,120,144,171,205,239>>,
                                "Now is the time for all "])
     in call from crypto:control/2


How can this be rectified.

Thankyou


More information about the erlang-questions mailing list