On regenerating codes and secret sharing for distributed storage