问题标签 [crypt]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
perl - Perl crypt 似乎无法正常工作
我正在尝试使用 crypt 函数来验证数据库中用户的详细信息:
但它返回 0 行(密码绝对正确)
该行:
完美运行。
关于可能出现什么问题的任何想法?
php - 使用 crypt 进行不同的加密。盐应该是什么格式等
我正在构建我的开发课程,并且正在研究加密课程。我一直在阅读 php 的 crypt 函数和不同的加密类型,但有一些地方被模糊地解释了。
我的理解是有这些加密选项CRYPT_STD_DES
, CRYPT_EXT_DES
, CRYPT_MD5
, CRYPT_BLOWFISH
,CRYPT_SHA256
和CRYPT_SHA512
. 要查看它们是否已启用,您只需检查
问题
不同加密的盐要求/格式是什么? SO上的河豚要求。
为了澄清起见,我假设如果您使用河豚盐crypt()
会自动进行河豚加密吗?
php - hash() 与 crypt() 函数比较
我目前正在实施登录系统。我想将密码和盐存储在数据库中。现在我发现有一个hash()
和一个crypt()
函数似乎做同样的事情(对 SHA512 有效)。
hash()
比 . 更新并且似乎支持更多的散列算法crypt()
。还是我应该知道/关心的任何其他差异?
编辑:
结果看起来像$1$Qh6ByGJ9$zLn3yq62egvmc9D7SzA2u.
这是我的密码检查功能:
perl - Coldfusion加密到perl crypt
是否可以使用 ColdFusion 解密来复制 perl crypt 函数的输出?我不熟悉加密编程,但据我所知,除非另有说明,否则 crypt 使用 DES 算法。Coldfusion可以使用DES算法,但是我不知道要使用什么其他参数。
请允许我澄清一下我的情况。我正在使用供应商提供的用 perl 编写的应用程序。我的本地工具集主要是 ColdFusion。我想通过“丢失密码/重置密码”功能来增强供应商提供的登录功能。我不想更改我可以访问的供应商源代码,因为它会定期升级,我不想继续应用更改。出于多种原因,最好的解决方案是在 ColdFusion 中模拟 perl crypt() 函数输出,这样我就可以在供应商应用程序外部构建密码重置函数。诚然,这是一个尴尬和令人困惑的情况。
我不知道仿真方法是否可行;如果不是,那就回到绘图板上。
php - Best practice for a simple encryption class. Am I using crypt and mcrypt well?
These days I read a lot here on SO about password hashing and data encryption. It's a real mess, I mean, deciding what the best practice is. I need a very simple class that can be reused anywhere and that provide a decent-but-not-paranoic security level for my PHP applications (I do not handle bank data). Additionally, I want to rely as much as possible on PHP standard libs. I came up with this:
As you can see, I choose to hash passwords with crypt()
using Blowfish hashing algorithm. The return value of hashPassword()
is the salt + hash that then I store in the DB. I made this choice because crypt()
is available on every server, provides a confortable way to check hash regardless of algorithm used (it's based on salt prefix) and, I read, bcrypt is a decent hashing method.
Then, for data encryption I used mcrypt()
Rijndael 256 algorithm with CBC mode. As you can see, I can use encryption methods in two way. I can pass a IV (and generateIv()
helps me to create one) that I will store in the DB along crypted data, or, if I don't, a basic IV is derived from key in both crypt and decrypt process.
What do you think about it? Am I missing something? Can I be finally relaxed about hashing and encryption in my PHP aplications?!?
php - 将 PHP crypt() 结果存储在数据库中是否安全?
例如,对于河豚,它会返回如下内容:
$2a$12$DEzG.CRsHpxpTOAHooQ.wuR6Xe9h6PxFPhOcOvf.lqDNw1TVYVnEO
它包含有关散列算法类型的信息,并且包含盐。很多资源说只将这个值存储在数据库中,它将是安全的。但是,难道不能有人针对这些值测试一个常见的密码列表来破解其中的一些吗?
php - Comparing Hashed Password in the database to user Input in PHP MYSQLI
How do I compare hashed passwords that are stored in the database to a user inputted password, I need to do thsi so that the user could log in.
Here's how I hashed my password (using phps crypt method)
This is how I compare them to user input
I am 100% sure that I enterd the password correctly but the thing is mysql is not showing results,
postgresql - Java Swing 应用程序和 Postgres 数据库之间的密码加密
我正在构建一个具有 Java Swing 前端访问 postgres 数据库的系统。在本周发现Jasypt之前,我原本打算使用 Postgres 自己的加密机制。它工作得很好,但我现在也希望对网络上的密码进行加密,因此我求助于 Jasypt。
问题是,我需要一个固定密码才能输入到我的 Postgres 存储函数中。即如果输入密码是“aaa”,那么任何其他输入到 Postgres 存储函数中的密码(“aaa”除外)都将不匹配。
有没有办法让这两种加密机制协同工作,还是我必须转储 Postgres?
我的用户表:
加密密码:
解密密码:
如果我不能让他们两个一起工作,那么我将不得不转储 Postgres 的机制,因为我需要通过网络进行加密。
此外,关于数据库连接字符串和数据库用户名和密码(不使用任何框架......希望使用 SSL 的普通旧 jdbc 连接 - 尚未实现),我认为我无法使用 Jasypt,因为我需要在数据库级别对其进行解密。对于这种情况,仅 SSL 就足够了吗?
谢谢。
php - 刚刚使用 PHP 将加密切换为“crypt”,但现在任何密码都可以使用
我正在尝试在 PHP 中使用 crypt() 对用户进行身份验证。这是我在登录页面中的代码:
这是应该带回 True 或 False 的函数:
目前,无论我输入什么密码,它都会让我进入。当我对 $valid 执行 var_dump 时,它会返回加密密码的 98 个字符字符串,因此我知道 $valid 不等于 TRUE。请帮忙!
谢谢。