Method: CryptoToolchain::BlackBoxes::MT19937StreamCipher#keystream
- Defined in:
- lib/crypto_toolchain/black_boxes/mt_19937_stream_cipher.rb
#keystream ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/crypto_toolchain/black_boxes/mt_19937_stream_cipher.rb', line 33 def keystream return @keystream if defined? @keystream _keystream = (0..(plaintext.bytesize / 4)).each_with_object("") do |_, memo| memo << [prng.extract].pack("L") end @keystream = _keystream[0...(plaintext.bytesize)] end |