Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-Crypt-Password
perl-Crypt-Password.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Crypt-Password.spec of Package perl-Crypt-Password
# # spec file for package perl-Crypt-Password # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: perl-Crypt-Password Version: 0.28 Release: 0 #Upstream: CHECK(Artistic-1.0 or GPL-1.0-or-later) %define cpan_name Crypt-Password Summary: Unix-style, Variously Hashed Passwords License: Artistic-2.0 Group: Development/Libraries/Perl Url: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/D/DR/DRSTEVE/%{cpan_name}-%{version}.tgz Source1: cpanspec.yml BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros %{perl_requires} # MANUAL BEGIN BuildRequires: man BuildRequires: perl(Module::Install) # MANUAL END %description This is just a wrapper for perl's 'crypt()', which can do everything you would probably want to do to store a password, but this is to make usage easier. The object stringifies to the return string of the crypt() function, which is (on *Linux/glibc* et al) in Modular Crypt Format: # scalar($hashed): # v digest v hash -> # $5$%RK2BU%L$aFZd1/4Gpko/sJZ8Oh.ZHg9UvxCjkH1YYoLZI6tw7K8 # ^ salt ^ That you can store, etc, retrieve then use it in 'check_password()' to validate a login, etc. Not without some danger, so read on, you could also string compare it to the output of another 'password()', as long as the salt is the same. If you pass a crypted string as the salt it will use the same salt. If the given string is already hashed it is assumed to be okay to use it as is. So if you are checking something from the outside world pass it as the second argument to 'check_password($saved, $wild)'. You could also use 'crypt_password($wild)', which will definitely crypt its input. This means simpler code and users can supply pre-hashed passwords initially, but if you do it wrong a stolen hash could be used as a password, so buck up your ideas. If you aren't running *Linux/glibc*, everything after the WARNING in the synopsis is dubious as. If you've got insight into how this module can work better on your platform I would love to hear from you. %prep %setup -q -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %defattr(-,root,root,755) %doc CHANGES README SubmittingPatches %license COPYING.txt %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor