Skip to Main Content
  • Questions
  • Need to convert below java function to PL/Sql.

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Alok.

Asked: December 06, 2016 - 4:25 pm UTC

Last updated: December 07, 2016 - 8:05 am UTC

Version: 11G

Viewed 1000+ times

You Asked

Hi Tom

I need to convert below java function to PL/Sql. Is there any function in oracle Pl/sql for SecureRandom.getInstance("SHA1PRNG") and random.nextBytes().

public static byte[] generateSalt() throws Exception {
byte[] salt = null;
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
salt = new byte[16];
random.nextBytes(salt);
return salt;
}

Thanks
Alok

and Connor said...


Is this answer out of date? If it is, please let us know via a Comment

More to Explore

DBMS_RANDOM

More on PL/SQL routine DBMS_RANDOM here