1

We need 2 lines of code to convert string to byte array in Java. How to do same in Nodejs

Below is java code :

    String secretKey = "j3u8ue8xnrhsth59";
    byte[] keyValue = secretKey.getBytes();
    System.out.println(keyValue);
Abhishek Kumar
  • 1,879
  • 3
  • 22
  • 35

0 Answers0