Skip to content

Commit

Permalink
Use MessageDigestAlgorithm facade
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Sep 14, 2023
1 parent 8f5611e commit d924276
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/Stargate-Model/EntityTagHasher.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ Class {
EntityTagHasher >> calculateHash [

| message |
message := String streamContents: [ :stream |
toHash
do: [ :object | stream nextPutAll: object asString ]
separatedBy: [ stream nextPut: $- ] ].

message := String
streamContents:
[ :stream | toHash do: [ :object | stream nextPutAll: object asString ] separatedBy: [ stream nextPut: $- ] ].
^ ( SHA1 new hashMessage: message ) hex
^ MessageDigestAlgorithm sha1 digestStringAsHexString: message
]

{ #category : #configuring }
Expand Down

0 comments on commit d924276

Please sign in to comment.