Files
chis_osi/mapping/checkid.go
T

12 lines
258 B
Go
Raw Normal View History

package mapping
import (
"crypto/sha1"
"encoding/hex"
)
func GenerateCheckID(sourceSystem, dataType, sourceRecordID string) string {
sum := sha1.Sum([]byte(sourceSystem + "|" + dataType + "|" + sourceRecordID))
return hex.EncodeToString(sum[:])[:20]
}