How to Encrypt AES(PBKDF2WithHmacSHA1(String)) on OB

  • Hello there so I have this code I wanna find the proper functions in OB to simulate it (It's Java code):

    String passPhrase = password;
    byte[] saltBytes = salt.getBytes();
    SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
    KeySpec spec = new PBEKeySpec(passPhrase.toCharArray(), saltBytes, 2, 256);
    SecretKey tmp = factory.generateSecret(spec);
    SecretKey key = new SecretKeySpec(tmp.getEncoded(), "AES");

    is that even possible ?

Log in to reply