Created
June 19, 2011 21:32
-
-
Save keithrbennett/1034788 to your computer and use it in GitHub Desktop.
ReverseEncrypter - Naive Implementation of EncryptionContract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'encryption_contract' | |
# Naive and totally lame encrypter that just reverses the string. | |
class ReverseEncrypter | |
include EncryptionContract | |
def encrypt(s) | |
s.reverse | |
end | |
def decrypt(s) | |
s.reverse | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment