MCPcopy Create free account
hub / github.com/supabase/auth / ShouldReEncrypt

Method ShouldReEncrypt

internal/crypto/crypto.go:69–71  ·  view source on GitHub ↗

ShouldReEncrypt tells you if the value encrypted needs to be encrypted again with a newer key.

(encryptionKeyID string)

Source from the content-addressed store, hash-verified

67
68// ShouldReEncrypt tells you if the value encrypted needs to be encrypted again with a newer key.
69func (es *EncryptedString) ShouldReEncrypt(encryptionKeyID string) bool {
70 return es.KeyID != encryptionKeyID
71}
72
73func (es *EncryptedString) Decrypt(id string, decryptionKeys map[string]string) ([]byte, error) {
74 decryptionKey := decryptionKeys[es.KeyID]

Callers 4

GetSecretMethod · 0.80
AuthenticateMethod · 0.80
GetOtpCodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected