MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / Write

Method Write

utils/binary/builder.go:111–116  ·  view source on GitHub ↗

Write for impl. io.Writer

(p []byte)

Source from the content-addressed store, hash-verified

109
110// Write for impl. io.Writer
111func (b *Builder) Write(p []byte) (n int, err error) {
112 b.p(func(ub *pbuf.UserBuffer[teacfg]) {
113 n, err = ub.Write(p)
114 })
115 return
116}
117
118func (b *Builder) EncryptAndWrite(key []byte, data []byte) *Builder {
119 _, _ = b.Write(ftea.NewTeaCipher(key).Encrypt(data))

Callers 8

EncryptAndWriteMethod · 0.95
WriteBytesMethod · 0.95
MD5DigestFunction · 0.45
SHA256DigestFunction · 0.45
SHA1DigestFunction · 0.45
ComputeBlockSha1Function · 0.45
WriteStructMethod · 0.45
writeintFunction · 0.45

Calls 1

pMethod · 0.95

Tested by

no test coverage detected