mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
21 lines
383 B
Go
21 lines
383 B
Go
package keystore
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/accounts/keystore"
|
|
"os"
|
|
)
|
|
|
|
func Fuzz(input []byte) int {
|
|
|
|
ks := keystore.NewKeyStore("/tmp/ks", keystore.LightScryptN, keystore.LightScryptP)
|
|
|
|
a, err := ks.NewAccount(string(input))
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
if err := ks.Unlock(a, string(input)); err != nil {
|
|
panic(err)
|
|
}
|
|
os.Remove(a.URL.Path)
|
|
return 0
|
|
}
|