Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-secio
Commits
702833a5
Commit
702833a5
authored
Feb 08, 2020
by
Steven Allen
Committed by
GitHub
Feb 08, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #64 from libp2p/fix/remove-sha1
feat: remove sha1 hmac
parents
cf5f8d2f
e5b5458b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
3 deletions
+0
-3
al.go
al.go
+0
-3
No files found.
al.go
View file @
702833a5
...
...
@@ -8,7 +8,6 @@ import (
"crypto/aes"
"crypto/cipher"
"crypto/hmac"
"crypto/sha1"
"crypto/sha512"
"hash"
...
...
@@ -72,8 +71,6 @@ func (e *encParams) makeMacAndCipher() error {
func
newMac
(
hashType
string
,
key
[]
byte
)
(
HMAC
,
error
)
{
switch
hashType
{
case
"SHA1"
:
return
HMAC
{
hmac
.
New
(
sha1
.
New
,
key
),
sha1
.
Size
},
nil
case
"SHA512"
:
return
HMAC
{
hmac
.
New
(
sha512
.
New
,
key
),
sha512
.
Size
},
nil
case
"SHA256"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment