Skip to content

Commit

Permalink
chore: make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
renlulu committed Aug 6, 2024
1 parent b069153 commit b3281ff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crypto/bls/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func GenRandomBlsKeys() (*KeyPair, error) {

// SaveToFile saves the private key in an encrypted keystore file
func (k *KeyPair) SaveToFile(path string, password string) error {
data,err := k.EncryptedString(path, password)
data, err := k.EncryptedString(path, password)
if err != nil {
return err
}
Expand All @@ -203,7 +203,7 @@ func (k *KeyPair) SaveToFile(path string, password string) error {
return nil
}

func (k *KeyPair) EncryptedString(path string, password string) ([]byte,error) {
func (k *KeyPair) EncryptedString(path string, password string) ([]byte, error) {
sk32Bytes := k.PrivKey.Bytes()
skBytes := make([]byte, 32)
for i := 0; i < 32; i++ {
Expand All @@ -217,7 +217,7 @@ func (k *KeyPair) EncryptedString(path string, password string) ([]byte,error) {
keystore.StandardScryptP,
)
if err != nil {
return nil,err
return nil, err
}

encryptedBLSStruct := encryptedBLSKeyJSONV3{
Expand All @@ -226,10 +226,10 @@ func (k *KeyPair) EncryptedString(path string, password string) ([]byte,error) {
}
data, err := json.Marshal(encryptedBLSStruct)
if err != nil {
return nil,err
return nil, err
}
return data,nil
}
return data, nil
}

func ReadPrivateKeyFromFile(path string, password string) (*KeyPair, error) {
keyStoreContents, err := os.ReadFile(path)
Expand Down

0 comments on commit b3281ff

Please sign in to comment.