Skip to content

Commit

Permalink
updated usage of MD5Hex
Browse files Browse the repository at this point in the history
added deprecation to MD5Hex
  • Loading branch information
phires committed Jun 10, 2024
1 parent ec5b517 commit 5931187
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backends/p_guerrilla_db_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,14 @@ func GuerrillaDbRedis() Decorator {
if err := e.ParseHeaders(); err != nil {
Log().WithError(err).Error("failed to parse headers")
}
hash := MD5Hex(
hash, err := BLAKE2s128Hex(
to,
e.MailFrom.String(),
e.Subject,
ts)
if err != nil {
Log().WithError(err).Error("failed to hash")
}
e.QueuedId = hash

// Add extra headers
Expand Down
1 change: 1 addition & 0 deletions backends/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func ParseHeaders(mailData string) map[string]string {
//
// Returns:
// - string: The hexadecimal representation of the MD5 hash.
// Deprecated: use BLAKE128s128Hex instead
func MD5Hex(stringArguments ...string) string {
h := md5.New()
var r *strings.Reader
Expand Down

0 comments on commit 5931187

Please sign in to comment.