HashRedact does in-place redaction of UserData inside GlobalSyncData, by hashing attachment names.
(salt string)
| 187 | |
| 188 | // HashRedact does in-place redaction of UserData inside GlobalSyncData, by hashing attachment names. |
| 189 | func (gsd *GlobalSyncData) HashRedact(salt string) error { |
| 190 | for k, v := range gsd.Attachments { |
| 191 | gsd.Attachments[base.Sha1HashString(k, salt)] = v |
| 192 | delete(gsd.Attachments, k) |
| 193 | } |
| 194 | return nil |
| 195 | } |
| 196 | |
| 197 | // RedactRawSyncData runs HashRedact on the given sync data. |
| 198 | func RedactRawSyncData(syncData []byte, redactSalt string) ([]byte, error) { |
no test coverage detected