Module: Nova::Starbound::Protocol::Encryption

Included in:
Nova::Starbound::Protocol
Defined in:
lib/nova/starbound/protocol/encryption.rb

Overview

The encryption used in the protocol.

API:

  • public

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#encryption_providerEncryptor

Gets the encryption provider.

Returns:

Raises:

API:

  • public



26
27
28
29
30
31
32
# File 'lib/nova/starbound/protocol/encryption.rb', line 26

def encryption_provider
  raise NoEncryptionError if
    @encryption_provider.class.plaintext? &&
    !should_allow_plaintext?

  @encryption_provider
end

Instance Method Details

#initializeObject

Initialize the encryption.

API:

  • public



14
15
16
17
18
# File 'lib/nova/starbound/protocol/encryption.rb', line 14

def initialize
  @encryption_provider = Encryptors::Plaintext.new

  super()
end