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