> + * Convert blobName to an hashed unique ID SHA-256 hashing is used This
> + * method is used to create
> + *
> + * @param blobName
> + * @return
> + */
> + static public String getMetadataName(String blobName) {
> + MessageDigest messageDigest;
> + try {
> + messageDigest = MessageDigest.getInstance("SHA-256");
> +
> messageDigest.update(blobName.getBytes(OrionConstantValues.ENCODING));
> + byte[] digest = messageDigest.digest();
> + BigInteger bigInteger = new BigInteger(1, digest);
> + return bigInteger.toString(16);
> + } catch (NoSuchAlgorithmException e) {
> + e.printStackTrace();
Use logging instead of `e.printStackTrace()`
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/45/files#r14714347