Skip to content

Commit

Permalink
CLEANUP: Standardised all base 64 encoding to use standard encoding f…
Browse files Browse the repository at this point in the history
…or compatibility.
  • Loading branch information
jwrosewell committed Jun 19, 2021
1 parent 4c5c537 commit 4bf7a8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions salt.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func FromByteArray(bytes []byte) (*Salt, error) {
// the Base 64 string into a byte array of length 2 and then unpack the 4
// nibbles from the 2 bytes.
func FromBase64(data string) (*Salt, error) {
b, err := base64.RawStdEncoding.DecodeString(data)
b, err := base64.StdEncoding.DecodeString(data)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -83,7 +83,7 @@ func (s Salt) ToBase64String() string {
// Get the byte array.
b := saltAsBytes(s.bytes)
// Convert the byte array to a Base64 string.
return base64.RawStdEncoding.EncodeToString(b)
return base64.StdEncoding.EncodeToString(b)
}

// Get the salt value from a byte array.
Expand Down

0 comments on commit 4bf7a8e

Please sign in to comment.