fix: OriginalCID needs to be public
This commit is contained in:
parent
576161fbf8
commit
6d943b3b2e
|
@ -9,7 +9,7 @@ import (
|
||||||
type EncryptedCID struct {
|
type EncryptedCID struct {
|
||||||
Multibase
|
Multibase
|
||||||
encryptedBlobHash Multihash
|
encryptedBlobHash Multihash
|
||||||
originalCID CID
|
OriginalCID CID
|
||||||
encryptionAlgorithm byte
|
encryptionAlgorithm byte
|
||||||
padding uint32
|
padding uint32
|
||||||
chunkSizeAsPowerOf2 int
|
chunkSizeAsPowerOf2 int
|
||||||
|
@ -19,7 +19,7 @@ type EncryptedCID struct {
|
||||||
func NewEncryptedCID(encryptedBlobHash Multihash, originalCID CID, encryptionKey []byte, padding uint32, chunkSizeAsPowerOf2 int, encryptionAlgorithm byte) *EncryptedCID {
|
func NewEncryptedCID(encryptedBlobHash Multihash, originalCID CID, encryptionKey []byte, padding uint32, chunkSizeAsPowerOf2 int, encryptionAlgorithm byte) *EncryptedCID {
|
||||||
e := &EncryptedCID{
|
e := &EncryptedCID{
|
||||||
encryptedBlobHash: encryptedBlobHash,
|
encryptedBlobHash: encryptedBlobHash,
|
||||||
originalCID: originalCID,
|
OriginalCID: originalCID,
|
||||||
encryptionKey: encryptionKey,
|
encryptionKey: encryptionKey,
|
||||||
padding: padding,
|
padding: padding,
|
||||||
chunkSizeAsPowerOf2: chunkSizeAsPowerOf2,
|
chunkSizeAsPowerOf2: chunkSizeAsPowerOf2,
|
||||||
|
@ -72,6 +72,6 @@ func (c *EncryptedCID) ToBytes() []byte {
|
||||||
data = append(data, c.encryptedBlobHash.FullBytes...)
|
data = append(data, c.encryptedBlobHash.FullBytes...)
|
||||||
data = append(data, c.encryptionKey...)
|
data = append(data, c.encryptionKey...)
|
||||||
data = append(data, utils.EncodeEndian(c.padding, 4)...)
|
data = append(data, utils.EncodeEndian(c.padding, 4)...)
|
||||||
data = append(data, c.originalCID.ToBytes()...)
|
data = append(data, c.OriginalCID.ToBytes()...)
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue