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-core
Commits
58281f5c
Commit
58281f5c
authored
Aug 06, 2019
by
Cole Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about panic to KeyStretcher comments
parent
0ae8685b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
crypto/key.go
crypto/key.go
+5
-1
No files found.
crypto/key.go
View file @
58281f5c
...
@@ -180,7 +180,11 @@ type StretchedKeys struct {
...
@@ -180,7 +180,11 @@ type StretchedKeys struct {
}
}
// KeyStretcher returns a set of keys for each party by stretching the shared key.
// KeyStretcher returns a set of keys for each party by stretching the shared key.
// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey)
// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey).
// This function accepts the following cipher types:
// - AES-128
// - AES-256
// The function will panic upon receiving an unknown cipherType
func
KeyStretcher
(
cipherType
string
,
hashType
string
,
secret
[]
byte
)
(
StretchedKeys
,
StretchedKeys
)
{
func
KeyStretcher
(
cipherType
string
,
hashType
string
,
secret
[]
byte
)
(
StretchedKeys
,
StretchedKeys
)
{
var
cipherKeySize
int
var
cipherKeySize
int
var
ivSize
int
var
ivSize
int
...
...
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