Skip to content

Commit

Permalink
Use sha256 instead of md5 in node batcher processor
Browse files Browse the repository at this point in the history
MD5 is insecure cryptographic hash functions, and are therefore unsuitable for security applications.
  • Loading branch information
songy23 committed Jul 29, 2019
1 parent 11a0a2a commit 88e534a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processor/nodebatcher/node_batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package nodebatcher

import (
"context"
"crypto/md5"
"crypto/sha256"
"fmt"
"math/rand"
"sync"
Expand Down Expand Up @@ -112,7 +112,7 @@ func (b *batcher) ConsumeTraceData(ctx context.Context, td consumerdata.TraceDat
}

func (b *batcher) genBucketID(node *commonpb.Node, resource *resourcepb.Resource, spanFormat string) string {
h := md5.New()
h := sha256.New()
if node != nil {
nodeKey, err := proto.Marshal(node)
if err != nil {
Expand Down

0 comments on commit 88e534a

Please sign in to comment.