Package org.jets3t.service.security

Examples of org.jets3t.service.security.EncryptionUtil


        if (object.isDirectoryPlaceholder()) {
            return null;
        }
        else {
            boolean isZipped = false;
            EncryptionUtil encryptionUtil = null;

            if (automaticUnzip &&
                ("gzip".equalsIgnoreCase(object.getContentEncoding())
                || object.containsMetadata(Constants.METADATA_JETS3T_COMPRESSED)))
            {
                // Object data is gzipped.
                isZipped = true;
            }
            if (automaticDecrypt
                && object.containsMetadata(Constants.METADATA_JETS3T_CRYPTO_ALGORITHM))
            {
                // Object is encrypted.
                if (encryptionPassword == null) {
                    throw new ServiceException(
                        "One or more objects are encrypted, and cannot be downloaded unless "
                        + " the encyption password is provided");
                }

                String algorithm = (String) object.getMetadata(
                    Constants.METADATA_JETS3T_CRYPTO_ALGORITHM);
                String version = (String) object.getMetadata(
                    Constants.METADATA_JETS3T_CRYPTO_VERSION);
                if (version == null) {
                    version = EncryptionUtil.DEFAULT_VERSION;
                }
                encryptionUtil = new EncryptionUtil(encryptionPassword, algorithm, version);
            }

            return new org.jets3t.service.multithread.DownloadPackage(
                object, fileTarget, isZipped, encryptionUtil);
        }
View Full Code Here


                cockpitPreferencesPropertiesFile.delete();
            }

            if (cockpitPreferences.isEncryptionPasswordSet()) {
                try {
                    encryptionUtil = new EncryptionUtil(
                        cockpitPreferences.getEncryptionPassword(),
                        cockpitPreferences.getEncryptionAlgorithm(),
                        EncryptionUtil.DEFAULT_VERSION);
                } catch (Exception e) {
                    String message = "Unable to start encryption utility";
View Full Code Here

        String lastFileKeypathChecked = "";

        boolean skipMissingFiles =
            this.properties.getBoolProperty("upload.ignoreMissingPaths", false);

        EncryptionUtil encryptionUtil = null;
        if (isEncryptionEnabled) {
            String algorithm = properties
                .getStringProperty("crypto.algorithm", "PBEWithMD5AndDES");
            encryptionUtil = new EncryptionUtil(cryptoPassword, algorithm, EncryptionUtil.DEFAULT_VERSION);
        }

        // Support for multipart uploads -- currently available for Amazon S3 only
        MultipartUtils multipartUtils = null;
        if (storageService instanceof S3Service) {
View Full Code Here

TOP

Related Classes of org.jets3t.service.security.EncryptionUtil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.