Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String#crypt fails on Windows #2294

Closed
elyscape opened this Issue Dec 9, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@elyscape
Copy link

elyscape commented Dec 9, 2014

irb(main):001:0> 'foo'.crypt('ba')
NotImplementedError: crypt unsupported or native support failed to load
        from org/jruby/RubyString.java:2660:in `crypt'
        from (irb):1:in `evaluate'
        from org/jruby/RubyKernel.java:1107:in `eval'
        from org/jruby/RubyKernel.java:1507:in `loop'
        from org/jruby/RubyKernel.java:1270:in `catch'
        from org/jruby/RubyKernel.java:1270:in `catch'
        from jirb:13:in `(root)'

Windows doesn't offer a native libcrypt, so MRI uses its own custom implementation of the awful basic DES crypt(3). As such, it probably makes sense to fall back to the Java implementation that was used in previous versions of JRuby.

@enebo

This comment has been minimized.

Copy link
Member

enebo commented Dec 9, 2014

omgz...so obvious as well...

@enebo enebo added this to the JRuby 1.7.18 milestone Dec 9, 2014

@djberg96

This comment has been minimized.

Copy link
Contributor

djberg96 commented Dec 10, 2014

What about just using the openssl lib on Windows for the implementation?

enebo added a commit that referenced this issue Dec 10, 2014

@enebo

This comment has been minimized.

Copy link
Member

enebo commented Dec 10, 2014

This is simple enough since we have the pure-Java implementation anyways.

@enebo enebo closed this Dec 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.