Skip to content

Commit

Permalink
Change to Camel Case
Browse files Browse the repository at this point in the history
  • Loading branch information
joel.mathew committed May 28, 2024
1 parent ffac1fc commit 7e895ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ var static_data_key string = env.String("STATIC_DATA_KEY", "")
var data_key []byte
var dataKeyCache map[string][]byte = map[string][]byte{}

func is_valid_base_64_string(static_data_key string) bool {
func isValidBase64(static_data_key string) bool {
_, err := base64.StdEncoding.DecodeString(static_data_key)
return err == nil
}

func get_byte_string(static_data_key string) []byte {
func getByteString(static_data_key string) []byte {
return []byte(static_data_key)
}

Expand Down Expand Up @@ -150,8 +150,8 @@ func newCipherAESGCMObject(data_key_b64_str string, clientId string) (gcm cipher

var data_key []byte
// Get data key
if use_static_data_key && is_valid_base_64_string(static_data_key) {
data_key = get_byte_string(static_data_key)
if use_static_data_key && isValidBase64(static_data_key) {
data_key = getByteString(static_data_key)
} else {
data_key = getDataKey(data_key_b64_str, clientId)
}
Expand Down

0 comments on commit 7e895ff

Please sign in to comment.