mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
compiler: add aliases for many hashing packages
This commit adds support for the following packages: - crypto/md5 - crypto/sha1 - crypto/sha256 - crypto/sha512 They would normally need assembly implementations, but with these aliases they already work everywhere.
This commit is contained in:
committed by
Ron Evans
parent
a3c4421f39
commit
5e5ce98d42
@@ -15,6 +15,13 @@ package compiler
|
||||
import "tinygo.org/x/go-llvm"
|
||||
|
||||
var stdlibAliases = map[string]string{
|
||||
// crypto packages
|
||||
"crypto/md5.block": "crypto/md5.blockGeneric",
|
||||
"crypto/sha1.block": "crypto/sha1.blockGeneric",
|
||||
"crypto/sha1.blockAMD64": "crypto/sha1.blockGeneric",
|
||||
"crypto/sha256.block": "crypto/sha256.blockGeneric",
|
||||
"crypto/sha512.blockAMD64": "crypto/sha512.blockGeneric",
|
||||
|
||||
// math package
|
||||
"math.Asin": "math.asin",
|
||||
"math.Asinh": "math.asinh",
|
||||
|
||||
Reference in New Issue
Block a user