[#290] cmd/cli: Trim 0x prefix from salt argument of object hash cmd

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-11 17:43:38 +03:00 committed by Alex Vanin
parent 6df8c84fc2
commit 07a6e2cc43

View file

@ -432,7 +432,9 @@ func getObjectHash(cmd *cobra.Command, _ []string) error {
return err return err
} }
salt, err := hex.DecodeString(cmd.Flag(getRangeHashSaltFlag).Value.String()) strSalt := strings.TrimPrefix(cmd.Flag(getRangeHashSaltFlag).Value.String(), "0x")
salt, err := hex.DecodeString(strSalt)
if err != nil { if err != nil {
return err return err
} }