forked from TrueCloudLab/frostfs-api-go
[#380] Support changes in signature schemes
Support new `SignatureRFC6979` message. Make `refs.ECDSA_SHA512` to be default scheme. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f4fd28e39b
commit
d065453bd0
9 changed files with 470 additions and 368 deletions
|
@ -84,6 +84,20 @@ func (x *Signature) SetScheme(s SignatureScheme) {
|
|||
}
|
||||
}
|
||||
|
||||
// SetKey sets public key in a binary format.
|
||||
func (x *SignatureRFC6979) SetKey(v []byte) {
|
||||
if x != nil {
|
||||
x.Key = v
|
||||
}
|
||||
}
|
||||
|
||||
// SetSign sets signature.
|
||||
func (x *SignatureRFC6979) SetSign(v []byte) {
|
||||
if x != nil {
|
||||
x.Sign = v
|
||||
}
|
||||
}
|
||||
|
||||
// FromString parses SignatureScheme from a string representation,
|
||||
// It is a reverse action to String().
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue