From 58281f5c6d035ceda3969b12c2e85280357ff55c Mon Sep 17 00:00:00 2001 From: Cole Brown Date: Tue, 6 Aug 2019 11:18:41 -0400 Subject: [PATCH] Add note about panic to KeyStretcher comments --- crypto/key.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto/key.go b/crypto/key.go index 2706a7a..310fd47 100644 --- a/crypto/key.go +++ b/crypto/key.go @@ -180,7 +180,11 @@ type StretchedKeys struct { } // 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) { var cipherKeySize int var ivSize int