private String generateObjectKeyFromPassphrase(String passphrase, String password) throws Exception { String combinedString = passphrase + password; return ServiceUtils.toHex( ServiceUtils.computeMD5Hash(combinedString.getBytes(Constants.DEFAULT_ENCODING))) + "/jets3t.credentials"; }
public void setSHA256Hash(byte[] hash) { addMetadata( Constants.REST_HEADER_PREFIX + "content-sha256", ServiceUtils.toHex(hash)); }
private String generateObjectKeyFromPassphrase(String passphrase, String password) throws Exception { String combinedString = passphrase + password; return ServiceUtils.toHex( ServiceUtils.computeMD5Hash(combinedString.getBytes(Constants.DEFAULT_ENCODING))) + "/jets3t.credentials"; }
public void setSHA256Hash(byte[] hash) { addMetadata( Constants.REST_HEADER_PREFIX + "content-sha256", ServiceUtils.toHex(hash)); }
private String generateBucketNameFromPassphrase(String passphrase) throws Exception { return "jets3t-" + ServiceUtils.toHex( ServiceUtils.computeMD5Hash(passphrase.getBytes(Constants.DEFAULT_ENCODING))); }
private String generateBucketNameFromPassphrase(String passphrase) throws Exception { return "jets3t-" + ServiceUtils.toHex( ServiceUtils.computeMD5Hash(passphrase.getBytes(Constants.DEFAULT_ENCODING))); }
String credentialScope = datestampISO8601 + "/" + region + "/" + service + "/aws4_request"; String hashedCanonicalString = ServiceUtils.toHex( ServiceUtils.hash(canonicalRequestString, "SHA-256"));
String credentialScope = datestampISO8601 + "/" + region + "/" + service + "/aws4_request"; String hashedCanonicalString = ServiceUtils.toHex( ServiceUtils.hash(canonicalRequestString, "SHA-256"));
String password = new String(((JPasswordField) component).getPassword()); try { fieldValue = ServiceUtils.toHex( ServiceUtils.computeMD5Hash(password.getBytes(Constants.DEFAULT_ENCODING))); } catch (Exception e) {
String password = new String(((JPasswordField) component).getPassword()); try { fieldValue = ServiceUtils.toHex( ServiceUtils.computeMD5Hash(password.getBytes(Constants.DEFAULT_ENCODING))); } catch (Exception e) {
if (log.isDebugEnabled()) { log.debug("MD5 digest of data sent for '" + name + "' - B64:" + ServiceUtils.toBase64(dataMD5Hash) + " Hex:" + ServiceUtils.toHex(dataMD5Hash));
if (log.isDebugEnabled()) { log.debug("MD5 digest of data sent for '" + name + "' - B64:" + ServiceUtils.toBase64(dataMD5Hash) + " Hex:" + ServiceUtils.toHex(dataMD5Hash));
/** * Set the MD5 hash value of this object's data. * The hash value is stored as metadata under <code>Content-MD5</code> (Base64-encoded) * and the JetS3t-specific <code>md5-hash</code> (Hex-encoded). * * @param md5Hash * the MD5 hash value of the object's data. */ public void setMd5Hash(byte[] md5Hash) { addMetadata(METADATA_HEADER_HASH_MD5, ServiceUtils.toHex(md5Hash)); addMetadata(METADATA_HEADER_CONTENT_MD5, ServiceUtils.toBase64(md5Hash)); }
/** * Set the MD5 hash value of this object's data. * The hash value is stored as metadata under <code>Content-MD5</code> (Base64-encoded) * and the JetS3t-specific <code>md5-hash</code> (Hex-encoded). * * @param md5Hash * the MD5 hash value of the object's data. */ public void setMd5Hash(byte[] md5Hash) { addMetadata(METADATA_HEADER_HASH_MD5, ServiceUtils.toHex(md5Hash)); addMetadata(METADATA_HEADER_CONTENT_MD5, ServiceUtils.toBase64(md5Hash)); }
String bucketName = "jets3t-" + ServiceUtils.toHex( ServiceUtils.computeMD5Hash(passphrase.getBytes(Constants.DEFAULT_ENCODING))); String credentialObjectName = ServiceUtils.toHex( ServiceUtils.computeMD5Hash(combinedPassphraseAndPassword.getBytes(Constants.DEFAULT_ENCODING))) + "/jets3t.credentials";
String bucketName = "jets3t-" + ServiceUtils.toHex( ServiceUtils.computeMD5Hash(passphrase.getBytes(Constants.DEFAULT_ENCODING))); String credentialObjectName = ServiceUtils.toHex( ServiceUtils.computeMD5Hash(combinedPassphraseAndPassword.getBytes(Constants.DEFAULT_ENCODING))) + "/jets3t.credentials";
String hexMD5OfUploadedData = ServiceUtils.toHex( ((RepeatableRequestEntity) requestEntity).getMD5DigestOfData()); verifyExpectedAndActualETagValues(hexMD5OfUploadedData, object);
String hexMD5OfUploadedData = ServiceUtils.toHex( ((RepeatableRequestEntity) requestEntity).getMD5DigestOfData()); verifyExpectedAndActualETagValues(hexMD5OfUploadedData, object);
String signature = ServiceUtils.toHex(ServiceUtils.hmacSHA256( signingKey, ServiceUtils.stringToBytes(stringToSign)));
String signature = ServiceUtils.toHex(ServiceUtils.hmacSHA256( signingKey, ServiceUtils.stringToBytes(stringToSign)));