Update project structure and build process

This commit is contained in:
Juan Pablo Civile
2025-05-13 11:10:08 -03:00
parent 124e9fa1bc
commit d9f3e925a4
277 changed files with 15321 additions and 930 deletions

27
libwallet/scrypt.go Executable file
View File

@@ -0,0 +1,27 @@
package libwallet
import (
"golang.org/x/crypto/scrypt"
)
const (
iterations = 512
blockSize = 8
parallelizationFactor = 1
outputLength = 32
)
func Scrypt256(data, salt []byte) []byte {
return scrypt256(data, salt, iterations, blockSize, parallelizationFactor)
}
func scrypt256(data, salt []byte, iterations, blockSize, parallelizationFactor int) []byte {
key, err := scrypt.Key(data, salt, iterations, blockSize, parallelizationFactor, outputLength)
if err != nil {
panic("scrypt parameters are bad")
}
return key
}