// Path: src/main/java/io/openio/sds/common/Hex.java
// public static String toHex(byte[] bytes) {
// 	char[] hexChars = new char[bytes.length * 2];
// 	for (int j = 0; j < bytes.length; j++) {
// 		int v = bytes[j] & 0xFF;
// 		hexChars[j * 2] = hexArray[v >>> 4];
// 		hexChars[j * 2 + 1] = hexArray[v & 0x0F];
// 	}
// 	return new String(hexChars);
// }


import static io.openio.sds.common.Hex.toHex;
import java.util.Random;
package io.openio.sds.common;



/**
 * 
 * @author Christopher Dedeurwaerder
 *
 */
public class IdGen {

    private static final int REQ_ID_LENGTH = 16;
    
    private static Random rand = new Random();
    
    /**
     * Generates a new random request id
     * @return the generated id
     */
    public static String requestId() {
// Path: src/main/java/io/openio/sds/common/Hex.java
// public static String toHex(byte[] bytes) {
// 	char[] hexChars = new char[bytes.length * 2];
// 	for (int j = 0; j < bytes.length; j++) {
// 		int v = bytes[j] & 0xFF;
// 		hexChars[j * 2] = hexArray[v >>> 4];
// 		hexChars[j * 2 + 1] = hexArray[v & 0x0F];
// 	}
// 	return new String(hexChars);
// }


// Path: src/main/java/io/openio/sds/common/IdGen.java
import static io.openio.sds.common.Hex.toHex;
import java.util.Random;

package io.openio.sds.common;



/**
 * 
 * @author Christopher Dedeurwaerder
 *
 */
public class IdGen {

    private static final int REQ_ID_LENGTH = 16;
    
    private static Random rand = new Random();
    
    /**
     * Generates a new random request id
     * @return the generated id
     */
    public static String requestId() {
        return toHex(bytes(REQ_ID_LENGTH));