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
  • 2,136
  • 3
  • 24
  • 36

0 Answers0