瀏覽代碼

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)