Method: CryptoToolchain::BlackBoxes::MT19937StreamCipher#initialize

Defined in:
lib/crypto_toolchain/black_boxes/mt_19937_stream_cipher.rb

#initialize(plaintext, seed: rand(0..(self.class.max_seed))) ⇒ MT19937StreamCipher



19
20
21
22
23
# File 'lib/crypto_toolchain/black_boxes/mt_19937_stream_cipher.rb', line 19

def initialize(plaintext, seed: rand(0..(self.class.max_seed)))
  @seed = seed & self.class.max_seed
  @prng = CryptoToolchain::Utilities::MT19937.new(@seed)
  @plaintext = plaintext
end