fix: EncryptedCID FromBytes needs to be prefixed with class name
This commit is contained in:
parent
6d943b3b2e
commit
989cb82a01
|
@ -37,10 +37,10 @@ func DecodeEncryptedCID(cid string) (*EncryptedCID, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return FromBytes(data)
|
return EncryptedCIDFromBytes(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FromBytes(data []byte) (*EncryptedCID, error) {
|
func EncryptedCIDFromBytes(data []byte) (*EncryptedCID, error) {
|
||||||
if types.CIDType(data[0]) != types.CIDTypeEncryptedStatic {
|
if types.CIDType(data[0]) != types.CIDTypeEncryptedStatic {
|
||||||
return nil, errors.New("Invalid CID type")
|
return nil, errors.New("Invalid CID type")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue