[英]How to store and verify PIN code
I am developing a scratch-card voucher pin application 我正在开发刮刮卡凭证应用程序
Problem If the pin is encrypted, it will be difficult query the database for the verification. 问题如果引脚是加密的,将很难查询数据库以进行验证。 Since the search is based on pin. 由于搜索基于图钉。 How do i store the pin code so that 我如何存储密码
Just encrypt the pin and store it. 只需将密码加密并存储即可。 When the user enters the pin for verification, encrypt it also and compare the encrypted stored pin with the encrypted user-entered pin. 当用户输入密码进行验证时,也对其进行加密,并将加密的存储密码与加密的用户输入密码进行比较。 If you need to decode pin in rare cases, use a decodable encryption. 如果在极少数情况下需要解码引脚,请使用可解码的加密。 I would recommend not doing so and forcing the user to update to a new pin if he loses or forgets the old one. 我建议不要这样做,如果用户丢失或忘记了旧的密码,则强迫用户更新到新的密码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.