Skip to content

Instantly share code, notes, and snippets.

@halan

halan/mac.rb Secret

Created October 2, 2016 02:31
Show Gist options
  • Save halan/77d803e9c3c882633cbcde0f4322d1fb to your computer and use it in GitHub Desktop.
Save halan/77d803e9c3c882633cbcde0f4322d1fb to your computer and use it in GitHub Desktop.
def generate_message_fake(input, original)
fake_block = blocks(input)
original_sum = sum(blocks(original))
fake_sum = sum(fake_block)
[*fake_block.flatten, *sum([original_sum, fake_sum])].map(&:chr).join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment