Skip to content

Instantly share code, notes, and snippets.

@justincase
Created February 1, 2013 09:36
Show Gist options
  • Save justincase/4690368 to your computer and use it in GitHub Desktop.
Save justincase/4690368 to your computer and use it in GitHub Desktop.
BCrypt's 72 char limit
require 'bcrypt'
char71 = "a" * 71
char72 = char71 + "b"
BCrypt::Password.create(char71) == char72 # => false
char72 = "a" * 72
char73 = char72 + "b"
BCrypt::Password.create(char72) == char73 # => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment