@Test public void testComputeSessionId() { final String sessionIdInput = SQLUtils.computeSessionId("sessionIdInput"); assertEquals("SQLQuery:920c83186d589d993633e3e0ddf6f25b7815cccd241b5a8ef1569558b07764b7", sessionIdInput); }
@NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHexString(0xFF & aByteData); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); }
SQLUtils { @NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHexString(0xFF & aByteData); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); } }
SQLUtils { @NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHexString(0xFF & aByteData); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); }  }
SQLUtils { @NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHexString(0xFF & aByteData); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); }  static void loadClassForName(@NotNull final String className); static String processNullTerminatedString(final String value); static String getIPv4OrIPv6WithSquareBracketsHost(String dbServer); static String exceptionToString(Throwable e); static String toString(SQLException e); @NotNull static String computeSessionId(@NotNull final String aString); static String processDumpException(SQLException sqlException); static String processLoadException(SQLException e); static List<String> readFromFile(String fileName); @NotNull static List<String> getRowsFromGlobalSessionMap(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String aKey); @NotNull static String getStrColumns(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String strKeyCol); }
SQLUtils { @NotNull public static String computeSessionId(@NotNull final String aString) { final byte[] byteData = DigestUtils.sha256(aString.getBytes()); final StringBuilder sb = new StringBuilder("SQLQuery:"); for (final byte aByteData : byteData) { final String hex = Integer.toHexString(0xFF & aByteData); if (hex.length() == 1) { sb.append('0'); } sb.append(hex); } return sb.toString(); }  static void loadClassForName(@NotNull final String className); static String processNullTerminatedString(final String value); static String getIPv4OrIPv6WithSquareBracketsHost(String dbServer); static String exceptionToString(Throwable e); static String toString(SQLException e); @NotNull static String computeSessionId(@NotNull final String aString); static String processDumpException(SQLException sqlException); static String processLoadException(SQLException e); static List<String> readFromFile(String fileName); @NotNull static List<String> getRowsFromGlobalSessionMap(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String aKey); @NotNull static String getStrColumns(@NotNull final GlobalSessionObject<Map<String, Object>> globalSessionObject, @NotNull final String strKeyCol);  }