소스 검색

auth work

reid 2 년 전
부모
커밋
c6f6d0b5ad
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      auth/auth.go

+ 1 - 1
auth/auth.go

@@ -230,7 +230,7 @@ func KeyfileEncrypt(contents map[string]string, key string) (string, error) {
 	// convert key to bytes
 	keyBytes := []byte(key)
 	if len(keyBytes) != 32 {
-		return "", fmt.Errorf("key must be 32 bytes in length")
+		return "", fmt.Errorf("key must be 32 bytes in length; actual length:",len(keyBytes))
 	}
 	var keyArray [32]byte
 	copy(keyArray[:], keyBytes)