Showing 5 of 24 total issues
Function KeyStretcher
has 57 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func KeyStretcher(cipherType string, hashType string, secret []byte) (StretchedKeys, StretchedKeys) {
var cipherKeySize int
var ivSize int
switch cipherType {
case "AES-128":
Method sweeper.update
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (sw *sweeper) update() {
sw.snapshotMu.Lock()
defer sw.snapshotMu.Unlock()
now := time.Now()
Method Conn.runHandshakeSync
has 7 return statements (exceeds 4 allowed). Open
Open
func (ic *Conn) runHandshakeSync() error {
// If we were initialized without keys, behave as in plaintext/1.0.0 (do nothing)
if ic.localPrivKey == nil {
return nil
}
Function GenerateEKeyPair
has 5 return statements (exceeds 4 allowed). Open
Open
func GenerateEKeyPair(curveName string) ([]byte, GenSharedKey, error) {
var curve elliptic.Curve
switch curveName {
case "P-256":
Function KeyPairFromStdKey
has 5 return statements (exceeds 4 allowed). Open
Open
func KeyPairFromStdKey(priv crypto.PrivateKey) (PrivKey, PubKey, error) {
if priv == nil {
return nil, nil, ErrNilPrivateKey
}