forked from aksdb/CalAnonSync
Added hashing of EWS calendar item IDs
This commit is contained in:
parent
5d62c932d5
commit
e3288f9848
|
@ -2,6 +2,8 @@ package main
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -22,6 +24,16 @@ type CalendarItem struct {
|
|||
UID string
|
||||
Start time.Time
|
||||
End time.Time
|
||||
RecurrenceId string
|
||||
Sensitivity string
|
||||
CalendarItemType string
|
||||
}
|
||||
|
||||
func (ci CalendarItem) Hash() string {
|
||||
h := md5.New()
|
||||
h.Write([]byte(ci.UID))
|
||||
h.Write([]byte(ci.RecurrenceId))
|
||||
return strings.ToUpper(hex.EncodeToString(h.Sum(nil)))
|
||||
}
|
||||
|
||||
type EWSCalendar struct {
|
||||
|
|
Loading…
Reference in New Issue