Class: Siffer::Messages::Security

Inherits:
AcDc::Body
  • Object
show all
Defined in:
lib/siffer/messages/header.rb

Class Method Summary collapse

Class Method Details

.create(options = {}) {|security| ... } ⇒ Object

Yields:

  • (security)


14
15
16
17
18
19
20
21
# File 'lib/siffer/messages/header.rb', line 14

def self.create(options = {}, &block)
  security = Security.new
  security.secure_channel = SecureChannel.new
  security.secure_channel.encryption_level = options[:encryption] || 0
  security.secure_channel.authentication_level = options[:authentication] || 0
  yield security if block_given?
  security
end