Package com.cloudloop.encryption

Examples of com.cloudloop.encryption.BufferedCipherStream


  }
 
  if ( isEncrypted( ) )
  {
      InputStream plaintext = file.getStreamToStore( );
      BufferedCipherStream ciphertext = _encryptor
        .encryptStream( plaintext );
      file.setStreamToStore( ciphertext );
     
      // we need to set two important pieces of meta-data:
      // the salt value used for encrypting this file, and
      // an MD5 hash of the key used to encrypt it.
      String salt = ciphertext.getSaltAsString( );
      String keyMD5 = ciphertext.getKeyMD5( );
      CloudStoreObjectMetadata meta = file.getMetadata( );
      meta.setEncryptionSalt( salt );
      meta.setDecryptionKeyHash( keyMD5 );
      file.setDirtyMetadata( meta );
  }
View Full Code Here

TOP

Related Classes of com.cloudloop.encryption.BufferedCipherStream

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.