Package com.elasticinbox.core.blob.encryption

Examples of com.elasticinbox.core.blob.encryption.AESEncryptionHandler


        // + DeflateCompressionHandler.COMPRESSION_TYPE_DEFLATE + "&"
        + BlobStoreConstants.URI_PARAM_ENCRYPTION_KEY + "="
        + Configurator.getBlobStoreDefaultEncryptionKeyAlias();

    // BlobStorage with encryption or compression
    BlobStorage bs = new CloudBlobStorage(new AESEncryptionHandler());

    // Write blob
    long origSize = testWrite(bs);

    // Check Blob URI
View Full Code Here


   
    // Create BlobStorage instance with AES encryption and Deflate compression
    CompressionHandler compressionHandler =
        Configurator.isBlobStoreCompressionEnabled() ? new DeflateCompressionHandler() : null;
    EncryptionHandler encryptionHandler =
        Configurator.isBlobStoreEncryptionEnabled() ? new AESEncryptionHandler() : null;

    this.blobStorage = new BlobStorageMediator(compressionHandler, encryptionHandler);
  }
View Full Code Here

    String keyAlias = blobUri.getEncryptionKey();

    if (keyAlias != null)
    {
      // currently we only support AES encryption, use by default
      EncryptionHandler eh = new AESEncryptionHandler();

      try {
        logger.debug("Decrypting object {} with key {}", uri, keyAlias);

        byte[] iv = getCipherIVFromBlobName(BlobUtils.relativize(uri.getPath()));

        in = eh.decrypt(CloudStoreProxy.read(uri),
            Configurator.getEncryptionKey(keyAlias), iv);
      } catch (GeneralSecurityException gse) {
        throw new IOException("Unable to decrypt message blob: ", gse);
      }
    } else {
View Full Code Here

TOP

Related Classes of com.elasticinbox.core.blob.encryption.AESEncryptionHandler

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.