On Fri, Sep 11, 2026 at 10:36:52AM -0700, Andrew Hewus Fresh wrote:
> I don't know that you need a module:
> 
> $ perl -E 'say crypt "abc", q{$2b$12$} .
>     join "", (".", "/", 0..9, "A".."Z", "a".."z")[map { rand 64 } 0..21 ]'
> $2b$12$ZO1oAMdD3PKv5ez5I6voPuG49EPUnNclRUA4UilfnCCiVP8OUWrlW
> $ perl -E 'say crypt "abc",
>         q{$2b$12$ZO1oAMdD3PKv5ez5I6voPuG49EPUnNclRUA4UilfnCCiVP8OUWrlW}'
> $2b$12$ZO1oAMdD3PKv5ez5I6voPuG49EPUnNclRUA4UilfnCCiVP8OUWrlW
> 
> See `man 3 crypt` and `man -O tag=crypt perlfunc` or `perldoc -f crypt`.
 
 
On Fri, Sep 11, 2026 at 01:37:39PM -0400, Chris Ross wrote:
> A quick check of man pages shows that perls build-in crypt() function
> calls the underlying libc crypt(3), and checking the man page of that
> on an OpenBSD system notes that you can use blowfish hashing by
> passing ‘$2’ as the “setting”/salt parameter to crypt(3).
> If you want to encrypt things with blowfish that are other than
> passwords, you might need to look at modules, but for basic password
> encryption you can use the same functions the system already does.

 
These are both great suggestions!  Thanks!  
I will use one of them instead of needing a cpan module.
--Paul


Reply via email to