Skip to content

Commit

Permalink
CamelCase aesCBCDecrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav Simonsson committed Jan 21, 2015
1 parent 1f8290c commit 8af42d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crypto/key_store_passphrase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 8af42d4

Please sign in to comment.