Support obfuscated2

This commit is contained in:
9seconds
2021-03-18 13:42:14 +03:00
parent 657a74a5c2
commit 58335b3e59
7 changed files with 225 additions and 7 deletions
+22
View File
@@ -0,0 +1,22 @@
package obfuscated2
import (
"crypto/sha256"
"hash"
"sync"
)
var sha256HasherPool = sync.Pool{
New: func() interface{} {
return sha256.New()
},
}
func acquireSha256Hasher() hash.Hash {
return sha256HasherPool.Get().(hash.Hash)
}
func releaseSha256Hasher(h hash.Hash) {
h.Reset()
sha256HasherPool.Put(h)
}