I'm looking for something similar to:
utl_smtp.command(conn, utl_encode.base64_encode(utl_raw.cast_to_raw(<username>)));
I couldn't find any reference among the DB2's system-defined modules and I've read that:
after migrating to DB2 there is a little surprise – there is nothing like
UTL_RAW
andUTL_ENCODE
functions
that was written on March 28, 2010.
Considering that DB2's Oracle compatibility has increased with every release from v9, do the newer versions of DB2 provide any equivalents for Oracle's UTL_ENCODE
and UTL_RAW
?
Best Answer
I believe you are correct. It does not look like DB2 has built in support for base64 encoding.
So that would leave the following as options:
Be careful with Java implementations of base64 though. A coworker of mine has mentioned he has seen a bug in all versions of it, in which "words" that have duplicate letters can decrypt into junk. So be careful and double check your base64 encoding/decoding.