On Fri, Sep 11, 2026 at 01:08:18PM -0400, Paul Wisehart wrote:
> Hi!,
> 
> I am wanting to do bcrypt in perl to
> store passwords.  I don't see a p5-*
> package that does that.  
> 
> Is there a OpenBSD perl module
> in base that does this?

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`.


> I'm still levelling up on finding
> the good OpenBSD perl stuff.
> 
> thanks for any pointers!,
> --
> Paul Wisehart
> 

-- 
andrew

Whatever happened to the days when hacking started at the cerebral cortex 
and not the keyboard?
                      -- Sid from UserFriendly.org

Reply via email to