Sha256: 007bc9055b27e40cbd39db51a0a9ae538dd5a89e2b11932756ea36d18a2bf4f7
Contents?: true
Size: 1.29 KB
Versions: 14
Compression:
Stored size: 1.29 KB
Contents
require 'sym/errors' module Sym module Data class WrapperStruct < Struct.new( :encrypted_data, # [Blob] Binary encrypted data (possibly compressed) :iv, # [String] IV used to encrypt the data :cipher_name, # [String] Name of the cipher used :salt, # [Integer] For password-encrypted data this is the salt :version, # [Integer] Version of the cipher used :compress # [Boolean] indicates if compression should be applied ) VERSION = 1 attr_accessor :compressed def initialize( encrypted_data:, # [Blob] Binary encrypted data (possibly compressed) iv:, # [String] IV used to encrypt the data cipher_name:, # [String] Name of the cipher used salt: nil, # [Integer] For password-encrypted data this is the salt version: VERSION, # [Integer] Version of the cipher used compress: Sym::Configuration.config.compression_enabled ) super(encrypted_data, iv, cipher_name, salt, version, compress) end def config Sym::Configuration.config end def serialize Marshal.dump(self) end def self.deserialize(data) Marshal.load(data) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems