The std/crypto module name is misleading. The module only provides sha256, which is a hashing function. The name suggests a broader cryptography library, or worse, gets associated with web3 nonsense.
Rename to std/hash. If HMAC or key derivation functions are added later, std/digest is another option (Ruby's convention), but std/hash covers the current scope.
Changes needed:
- Rename
codegen/src/runtime/crypto.rs to hash.rs
- Update
runtime_sigs.rs (function registration)
- Update
typechecker.rs (module registration, std/hash { sha256 })
- Update
aster-pkg/src/main.aster (use std/hash { sha256 })
- Update any tests that import
std/crypto
The
std/cryptomodule name is misleading. The module only providessha256, which is a hashing function. The name suggests a broader cryptography library, or worse, gets associated with web3 nonsense.Rename to
std/hash. If HMAC or key derivation functions are added later,std/digestis another option (Ruby's convention), butstd/hashcovers the current scope.Changes needed:
codegen/src/runtime/crypto.rstohash.rsruntime_sigs.rs(function registration)typechecker.rs(module registration,std/hash { sha256 })aster-pkg/src/main.aster(use std/hash { sha256 })std/crypto