A cool implementation of encryption/decryption in Ruby, borrowed from UCenter Authcode(comsenz).
For me, the coolest thing is, everytime it encodes a same string and generates different result, this makes it more secure.
Just install the gem:
gem install faceless
Or add it to your Gemfile:
gem 'faceless'
Faceless.configure do |config|
config.auth_token = 'whatever-token-you-want'
end
encrypted = Faceless::Authcode.encode("encrypt-me")
Faceless::Authcode.decode encrypted
The original algorithm implementation was in PHP by comsenz.
Thanks to them. 🍻
The name of this project is from http://gameofthrones.wikia.com/wiki/Faceless_Men