fix: OriginalCID needs to be public

This commit is contained in:
Derrick Hammer 2024-01-03 15:27:35 -05:00
parent 576161fbf8
commit 6d943b3b2e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ import (
type EncryptedCID struct {
Multibase
encryptedBlobHash Multihash
originalCID CID
OriginalCID CID
encryptionAlgorithm byte
padding uint32
chunkSizeAsPowerOf2 int
@ -19,7 +19,7 @@ type EncryptedCID struct {
func NewEncryptedCID(encryptedBlobHash Multihash, originalCID CID, encryptionKey []byte, padding uint32, chunkSizeAsPowerOf2 int, encryptionAlgorithm byte) *EncryptedCID {
e := &EncryptedCID{
encryptedBlobHash: encryptedBlobHash,
originalCID: originalCID,
OriginalCID: originalCID,
encryptionKey: encryptionKey,
padding: padding,
chunkSizeAsPowerOf2: chunkSizeAsPowerOf2,
@ -72,6 +72,6 @@ func (c *EncryptedCID) ToBytes() []byte {
data = append(data, c.encryptedBlobHash.FullBytes...)
data = append(data, c.encryptionKey...)
data = append(data, utils.EncodeEndian(c.padding, 4)...)
data = append(data, c.originalCID.ToBytes()...)
data = append(data, c.OriginalCID.ToBytes()...)
return data
}