fix: check 1st byte of pubkey, not mhashType

This commit is contained in:
Derrick Hammer 2024-03-01 01:35:54 -05:00
parent 5b7d786662
commit 8d7383c466
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error {
case 2:
pubkey = proofData[j].([]byte)
if types.HashType(mhashType) != types.HashTypeEd25519 {
if types.HashType(pubkey[0]) != types.HashTypeEd25519 {
return errors.New("Invalid public key type")
}