aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-01-22 02:08:05 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-01-22 02:08:05 +0800
commit8af42d42da1d428025622d3b76982798ec9436bd (patch)
treea8086c08c910666a8deeb9773c9ce4e4c7f1f34b /crypto
parent1f8290ca44df31cc4c4b68b30eef412476ed24e0 (diff)
downloadgo-tangerine-8af42d42da1d428025622d3b76982798ec9436bd.tar.gz
go-tangerine-8af42d42da1d428025622d3b76982798ec9436bd.tar.zst
go-tangerine-8af42d42da1d428025622d3b76982798ec9436bd.zip
CamelCase aesCBCDecrypt
Diffstat (limited to 'crypto')
-rw-r--r--crypto/crypto.go4
-rw-r--r--crypto/key_store_passphrase.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/crypto/crypto.go b/crypto/crypto.go
index 066d23dcb..55d6f47e7 100644
--- a/crypto/crypto.go
+++ b/crypto/crypto.go
@@ -156,7 +156,7 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
*/
passBytes := []byte(password)
derivedKey := pbkdf2.Key(passBytes, passBytes, 2000, 16, sha256.New)
- plainText, err := aes_cbc_decrypt(derivedKey, cipherText, iv)
+ plainText, err := aesCBCDecrypt(derivedKey, cipherText, iv)
ethPriv := Sha3(plainText)
ecKey := ToECDSA(ethPriv)
key = &Key{
@@ -171,7 +171,7 @@ func decryptPreSaleKey(fileContent []byte, password string) (key *Key, err error
return key, err
}
-func aes_cbc_decrypt(key []byte, cipherText []byte, iv []byte) (plainText []byte, err error) {
+func aesCBCDecrypt(key []byte, cipherText []byte, iv []byte) (plainText []byte, err error) {
aesBlock, err := aes.NewCipher(key)
if err != nil {
return plainText, err
diff --git a/crypto/key_store_passphrase.go b/crypto/key_store_passphrase.go
index 913b68498..80bf49d68 100644
--- a/crypto/key_store_passphrase.go
+++ b/crypto/key_store_passphrase.go
@@ -178,7 +178,7 @@ func DecryptKey(ks keyStorePassphrase, keyId *uuid.UUID, auth string) (keyBytes
if err != nil {
return nil, err
}
- plainText, err := aes_cbc_decrypt(derivedKey, cipherText, iv)
+ plainText, err := aesCBCDecrypt(derivedKey, cipherText, iv)
if err != nil {
return nil, err
}