MCPcopy
hub / github.com/zitadel/zitadel / EncryptionAlgorithm

Interface EncryptionAlgorithm

internal/crypto/crypto.go:19–29  ·  view source on GitHub ↗

go:generate mockgen -typed -package crypto -destination ./crypto.mock.go . EncryptionAlgorithm

Source from the content-addressed store, hash-verified

17//go:generate mockgen -typed -package crypto -destination ./crypto.mock.go . EncryptionAlgorithm
18
19type EncryptionAlgorithm interface {
20 Algorithm() string
21 EncryptionKeyID() string
22 DecryptionKeyIDs() []string
23 Encrypt(value []byte) ([]byte, error)
24 Decrypt(hashed []byte, keyID string) ([]byte, error)
25
26 // DecryptString decrypts the value using the key identified by keyID.
27 // When the decrypted value contains non-UTF8 characters an error is returned.
28 DecryptString(hashed []byte, keyID string) (string, error)
29}
30
31// CryptoValue is a struct that can be used to store encrypted values in a database.
32// The struct is compatible with the [driver.Valuer] and database/sql.Scanner interfaces.

Callers 41

EncryptFunction · 0.65
checkEncryptionAlgorithmFunction · 0.65
CreateMockEncryptionAlgFunction · 0.65
createMockCryptoFunction · 0.65
cryptoValueFunction · 0.65
EncryptFunction · 0.65
CheckTokenFunction · 0.65
CreateMockEncryptionAlgFunction · 0.65
decryptRefreshTokenMethod · 0.65
FromRefreshTokenFunction · 0.65

Implementers 4

MockEncryptionAlgorithminternal/crypto/crypto.mock.go
MockEncryptionAlgorithmMockRecorderinternal/crypto/crypto.mock.go
AESCryptointernal/crypto/aes.go
mockEncCryptointernal/crypto/crypto_test.go

Calls

no outgoing calls

Tested by

no test coverage detected