[#190] crypto: Start Scheme enum from zero

Enumerate signature schemes of `Scheme` type from 0 in order to sync
with NeoFS API protocol by values.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-04-19 10:25:42 +03:00 committed by LeL
parent ea043f4ca3
commit 2f9cc50fec
2 changed files with 5 additions and 10 deletions

View file

@ -6,12 +6,12 @@ import (
// Scheme represents digital signature algorithm with fixed cryptographic hash function.
//
// Non-positive values are reserved and depend on context (e.g. unsupported scheme).
type Scheme uint32
// Negative values are reserved and depend on context (e.g. unsupported scheme).
type Scheme int32
//nolint:revive
const (
_ Scheme = iota
_ Scheme = iota - 1
ECDSA_SHA512 // ECDSA with SHA-512 hashing (FIPS 186-3)
ECDSA_DETERMINISTIC_SHA256 // Deterministic ECDSA with SHA-256 hashing (RFC 6979)