mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add support for Let's Encrypt http-01 challenge
This commit is contained in:
parent
3884a33b36
commit
12ff562d31
32 changed files with 2049 additions and 293 deletions
19
vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go
generated
vendored
19
vendor/golang.org/x/crypto/pbkdf2/pbkdf2_test.go
generated
vendored
|
@ -155,3 +155,22 @@ func TestWithHMACSHA1(t *testing.T) {
|
|||
func TestWithHMACSHA256(t *testing.T) {
|
||||
testHash(t, sha256.New, "SHA256", sha256TestVectors)
|
||||
}
|
||||
|
||||
var sink uint8
|
||||
|
||||
func benchmark(b *testing.B, h func() hash.Hash) {
|
||||
password := make([]byte, h().Size())
|
||||
salt := make([]byte, 8)
|
||||
for i := 0; i < b.N; i++ {
|
||||
password = Key(password, salt, 4096, len(password), h)
|
||||
}
|
||||
sink += password[0]
|
||||
}
|
||||
|
||||
func BenchmarkHMACSHA1(b *testing.B) {
|
||||
benchmark(b, sha1.New)
|
||||
}
|
||||
|
||||
func BenchmarkHMACSHA256(b *testing.B) {
|
||||
benchmark(b, sha256.New)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue