MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / decrypt

Function decrypt

driver/ipfs-synckv/singularity.go:39–55  ·  view source on GitHub ↗
(data []byte, key []byte)

Source from the content-addressed store, hash-verified

37 nonceSize := gcm.NonceSize()
38 if len(data) < nonceSize {
39 return nil, errCiphertextTooShort
40 }
41 nonce, cipherText := data[:nonceSize], data[nonceSize:]
42 return gcm.Open(nil, nonce, cipherText, nil)
43}

Callers 2

GetMethod · 0.70
ValueMethod · 0.70

Calls 2

ErrorMethod · 0.45
OpenMethod · 0.45

Tested by

no test coverage detected