Simple and Terrifying Encryption Story

22-Jan-2017 5416

When I was developing my new feature, I found something very disturbing. I wrote a test for decoding messages with wrong keys. To be more specific, I replaced the key first char with some other chars (ab, and so on). I expected bad decrypt error to be raised, obviously. And… my test failed! Not only was nothing raised, but after a quick inspection I discovered that my message was properly decoded:

Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle