Skip to content

Instantly share code, notes, and snippets.

@k4200
Created March 21, 2011 05:14
Show Gist options
  • Save k4200/879070 to your computer and use it in GitHub Desktop.
Save k4200/879070 to your computer and use it in GitHub Desktop.
crypt in Ruby
irb(main):002:0> "1234567890".crypt("AA")
=> "AAOytELTtvgVU"
irb(main):003:0> "1234567809".crypt("AA")
=> "AAOytELTtvgVU"
irb(main):004:0> "1234567809".crypt("$1$AA")
=> "$1$AA$FGGqw9MVpWh4jOox/NNHk0"
irb(main):005:0> "1234567890".crypt("$1$AA")
=> "$1$AA$GpKPiWMTtFX2jcBN5zP7v1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment