lib/symmetric_encryption/writer.rb in symmetric-encryption-0.6.1 vs lib/symmetric_encryption/writer.rb in symmetric-encryption-0.7.0
- old
+ new
@@ -27,11 +27,11 @@
# is encrypted and whether its contents are compressed
#
# The header contains:
# Version of the encryption key used to encrypt the file
# Indicator if the data was compressed
- # Default: false
+ # Default: true
#
# :version
# Version of the encryption key to use when encrypting
# Default: Current primary key
#
@@ -80,10 +80,10 @@
end
# Encrypt data before writing to the supplied stream
def initialize(ios,options={})
@ios = ios
- header = options.fetch(:header, false)
+ header = options.fetch(:header, true)
# Compress is only used at this point for setting the flag in the header
@compress = options.fetch(:compress, false)
# Use primary cipher by default, but allow a secondary cipher to be selected for encryption
@cipher = SymmetricEncryption.cipher(options[:version])