Oracle: Is there a way to encode a value using the unix crypt method?
-
28-10-2019 - |
Question
Is there a way to encode a value using the unix crypt method in oracle 10g?
(Other DBMS like MySQL support this)
Solution
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.
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow