MCPcopy Create free account
hub / github.com/pydio/cells / GetEncrypted

Method GetEncrypted

common/nodes/encryption/tools.go:78–89  ·  view source on GitHub ↗
(ctx context.Context, keyID string, data []byte)

Source from the content-addressed store, hash-verified

76}
77
78func (kt *userKeyTool) GetEncrypted(ctx context.Context, keyID string, data []byte) ([]byte, error) {
79 kt.Lock()
80 defer kt.Unlock()
81
82 keyBytes, err := kt.keyByID(ctx, keyID)
83
84 if err != nil {
85 return nil, err
86 }
87
88 return crypto.Seal(keyBytes, data)
89}
90
91func (kt *userKeyTool) GetDecrypted(ctx context.Context, keyID string, encrypted []byte) ([]byte, error) {
92 kt.Lock()

Callers

nothing calls this directly

Calls 4

keyByIDMethod · 0.95
SealFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected