简体   繁体   English

可以在多个机器/应用程序中使用bcrypt或任何其他类型的cry吗?

[英]can bcrypt or any other kind of cryto be used across multiple machines/applications?

So I want to store a password in a config file that can be shared across my servers/applications. 因此,我想将密码存储在可以在服务器/应用程序之间共享的配置文件中。 I have never used a hashing algorithm like bcrypt in this manner, but I have 3 applications I want to use the same password for. 我从未以这种方式使用过像bcrypt这样的哈希算法,但是我想使用3个应用程序使用相同的密码。 I really don't want to store the password in plain text (as it will just be out on the company network drive) so what are my options? 我真的不想将密码存储为纯文本格式(因为它只会在公司网络驱动器上显示),那么我有什么选择?

Yes you can use BCrypt across multiple platforms, of endian order and bitness. 是的,您可以跨字节序和字节序在多个平台上使用BCrypt。 The output is well defined in terms of the input. 就输入而言,输出定义良好。

But BCrypt cannot be used to store passwords. 但是BCrypt不能用于存储密码。 It can only be used to verify passwords. 它只能用于验证密码。

With that you can have the different systems, which accept a username/password from the user, use BCrypt to verify the entered password against the bcrypt hash stored in a central password file (eg database). 这样,您就可以拥有不同的系统,这些系统接受用户的用户名/密码,使用BCrypt对照存储在中央密码文件(例如数据库)中的bcrypt哈希来验证输入的密码。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM