本文介绍了哪种算法最慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮帮我;我无法描述哪种算法更好?



我尝试了什么:





i已读过这篇文章:



[]



我理解最好asp.net webforms的哈希算法是 PBKDF2-HMAC-SHA512

然后得到这个实现:



[]



此实现基于 PBKDF2- HMAC-SHA1



i搜索可以帮我制作的东西一个哈希基于 PBKDF2-HMAC-SHA512



我在github上找到了这个库:



[]
此库中的
我可以将我的哈希算法定义为< b> HMACSHA1< / b>,< b> HMACSHA256< / b>,< b> HMACSHA384< / b>或者< b> HMACSHA512< / b>



如您所知 HMACSHA1 HMACSHA512 更快。出于安全考虑,它并不好。



但是我发现了一些我不知道的事情是不是真的!我已在同一页面中实现了这两种算法,并了解adriancs的算法比迈克的算法需要更长的时间。 adriancs的文章不合逻辑。



所以,我想知道哪种算法最慢,哪种更好?





任何帮助将不胜感激。

谢谢你,Masoud。

Please help me; I can't describe which algorithm is better?

What I have tried:

Hi,
i have read this article:

Salted Password Hashing - Doing it Right[^]

and i understand that the best hash algorithm for asp.net webforms is PBKDF2-HMAC-SHA512
and then get this implementation:

GitHub - defuse/password-hashing: Password hashing code.[^]

this implementation is based on PBKDF2-HMAC-SHA1

i googled to find something that help me to make a hash based on PBKDF2-HMAC-SHA512

and i've found this library on github:

GitHub - therealmagicmike/PBKDF2.NET: Provides adaptive password-based key derivation (PBKDF2) functionality for the .NET Framework allowing the use of any System.Security.Cryptography.HMAC-based hashing implementation, whether it's a built-in type, or an implementation of your own.[^]
in this library i can define my hash algorithm as <b>HMACSHA1</b>, <b>HMACSHA256</b>, <b>HMACSHA384</b> or <b>HMACSHA512</b>

and as you know HMACSHA1 is faster than HMACSHA512. and it's not good in security reasons.

But i've found something that i don't know it's true or not! i've implemented both algorithms in same page and understand that adriancs's algorithm takes longer time than the mike's. and it's not logical as for adriancs's article.

So, i want to know which algorithm is slowest and also wich is better?


any help will be appreciated.
Thank you, Masoud.

推荐答案


这篇关于哪种算法最慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 08:57