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

Method IsValid

internal/crypto/crypto.go:62–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func (es *EncryptedString) IsValid() bool {
63 // cipher.NewGCM() is always used, which panics on a Nonce that is not 12 bytes
64 // enforce that the nonce length and other values are correct
65 return es.KeyID != "" && len(es.Data) > 0 && len(es.Nonce) == 12 && es.Algorithm == "aes-gcm-hkdf"
66}
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 {

Callers 1

ParseEncryptedStringFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected