how to encrypt a password in shell script

Hi,

I have run the below script which is connected to db2 v9.5. There is no issue. The only problem is how to encrypt the dbpwd?

#!/bin/ksh
#---- Set Environment
dbalias="dev1db"
dbuser="user1"
dbpwd="password"

#---- Connect to the Database

cd /opt/ibm/db2/V9.5/bin
db2 "connect to $dbalias user $dbuser using $dbpwd" 

#
db2 "delete from table1" 
db2 "commit"
#
db2 "connect reset"
db2 "terminate"

Thanks

Not sure but: Declare user/pass in .profile and EXPORT