Guest User

Untitled

a guest
Jan 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. /**
  2. * Takes in a radix64 stored as a byte[] and converts it to binary
  3. * @param num A radix64 value
  4. * @return A binary value stored as a byte[]
  5. */
  6. private static byte[] convertToBinary(byte[] num)
  7. {
  8. BigInteger temp = new BigInteger(num); // Create a BigInteger with num
  9. String binary = temp.toString(2); // Convert num to binary
  10.  
  11. return binary.getBytes(); // Set num to binary
  12. }
Add Comment
Please, Sign In to add comment