class Nova::Starbound::Encryptors::Plaintext
The plaintext encryptor.
Constants
- RANDOM
The random provider for this clas.
Public Class Methods
available?()
click to toggle source
Whether or not this encryptor is available. Since it’s plaintext, it’s always available.
@return [true]
# File lib/nova/starbound/encryptors/plaintext.rb, line 18 def self.available? true end
plaintext?()
click to toggle source
Whether or not this encryptor is plaintext. It is. This will always return true for this class.
@return [true]
# File lib/nova/starbound/encryptors/plaintext.rb, line 26 def self.plaintext? true end
Public Instance Methods
decrypt(packet)
click to toggle source
(see Encryptor#decrypt)
# File lib/nova/starbound/encryptors/plaintext.rb, line 39 def decrypt(packet) packet = packet.clone packet end
encrypt(packet)
click to toggle source
(see Encryptor#encrypt)
# File lib/nova/starbound/encryptors/plaintext.rb, line 31 def encrypt(packet) packet = packet.clone packet[:nonce] = RANDOM.bytes(24) packet end
other_public_key=(_)
click to toggle source
Does nothing.
@param _ [String] the other “public” key. @return [nil]
# File lib/nova/starbound/encryptors/plaintext.rb, line 59 def other_public_key=(_); end
private_key!()
click to toggle source
Does nothing.
@return [nil]
# File lib/nova/starbound/encryptors/plaintext.rb, line 48 def private_key!; end
public_key()
click to toggle source
Does nothing.
@return [String] an empty string.
# File lib/nova/starbound/encryptors/plaintext.rb, line 53 def public_key; ""; end