duce a string should raise an InvalidSalt error if the salt is invalid should raise an InvalidSecret error if the secret is invalid should call #to_s on the secret and use the return value as the actual secret data should be interoperable with other implementations Errors BCrypt::Error can be rescued as a StandardError BCrypt::Errors::InvalidCost can be rescued as a BCrypt::Error BCrypt::Errors::InvalidHash can be rescued as a BCrypt::Error BCrypt::Errors::InvalidSalt can be rescued as a BCrypt::Error BCrypt::Errors::InvalidSecret can be rescued as a BCrypt::Error Creating a hashed password should return a BCrypt::Password should return a valid bcrypt password should behave normally if the secret is not a string should tolerate empty string secrets Reading a hashed password the cost is too damn high the cost should be set to the default if nil the cost should be set to the default if empty hash the cost should be set to the passed value if provided the cost should be set to the global value if set the cost should be set to an overridden constant for backwards compatibility should read the version, cost, salt, and hash should raise an InvalidHashError when given an invalid hash Comparing a hashed password with a secret should compare successfully to the original secret should compare unsuccessfully to anything besides original secret Validating a generated salt should not accept an invalid salt should accept a valid salt Validating a password hash should not accept an invalid password should accept a valid password Finished in 20.97 seconds (files took 5.5 seconds to load) 34 examples, 0 failures + popd ~/build/BUILD/rubygem-bcrypt-3.1.12 + RPM_EC=0 ++ jobs -p + exit 0 Processing files: rubygem-bcrypt-3.1.12-7.fc33.riscv64 Provides: rubygem(bcrypt) = 3.1.12-1 rubygem(brypt-ruby) = 3.1.12 rubygem-bcrypt = 3.1.12-7.fc33 rubygem-bcrypt(riscv-64) = 3.1.12-7.fc33 rubygem-bcrypt-ruby = 3.1.12-7.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: ld-linux-riscv64-lp64d.so.1()(64bit) ld-linux-riscv64-lp64d.so.1(GLIBC_2.27)(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.27)(64bit) libruby.so.2.5()(64bit) rtld(GNU_HASH) ruby(rubygems) Obsoletes: rubygem-bcrypt-ruby <= 3.1.2-2 Processing files: rubygem-bcrypt-doc-3.1.12-7.fc33.noarch Provides: rubygem-bcrypt-doc = 3.1.12-7.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: rubygem-bcrypt-debugsource-3.1.12-7.fc33.riscv64 Provides: rubygem-bcrypt-debugsource = 3.1.12-7.fc33 rubygem-bcrypt-debugsource(riscv-64) = 3.1.12-7.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Processing files: rubygem-bcrypt-debuginfo-3.1.12-7.fc33.riscv64 Provides: debuginfo(build-id) = fd3ae86f883d4b7a7afc51a7024fc4a8d7b80221 rubygem-bcrypt-debuginfo = 3.1.12-7.fc33 rubygem-bcrypt-debuginfo(riscv-64) = 3.1.12-7.fc33 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Recommends: rubygem-bcrypt-debugsource(riscv-64) = 3.1.12-7.fc33 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/rubygem-bcrypt-3.1.12-7.fc33.riscv64 Wrote: /builddir/build/RPMS/rubygem-bcrypt-3.1.12-7.fc33.riscv64.rpm Wrote: /builddir/build/RPMS/rubygem-bcrypt-debugsource-3.1.12-7.fc33.riscv64.rpm Wrote: /builddir/build/RPMS/rubygem-bcrypt-debuginfo-3.1.12-7.fc33.riscv64.rpm Wrote: /builddir/build/RPMS/rubygem-bcrypt-doc-3.1.12-7.fc33.noarch.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.EqOBjL + umask 022 + cd /builddir/build/BUILD + cd rubygem-bcrypt-3.1.12 + /usr/bin/rm -rf /builddir/build/BUILDROOT/rubygem-bcrypt-3.1.12-7.fc33.riscv64 + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0