Is there a way开发者_如何转开发 to encode a value using the unix crypt method in oracle 10g?
(Other DBMS like MySQL support this)
The DBMS_CRYPTO
PL/SQL package has encryption, but none using the native weakness of the Unix crypt(1)
. It's much more analogous to crypt(3)
.
If you need the exact crypt(1)
implementation, you're going to have to code it yourself. Here's the C code for it.
Provided you are one Oracle8i or higher this is possible.
The solution is to write a Java Stored Procedure which can execute OS commands, and use that to run Unix crypt
. Tim Hall's Oracle-Base site has an example of how to code one of these things. Find it here.
精彩评论