Skip to content

Commit

Permalink
Avoid unnecessary b64 alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Mikulicic committed Jul 26, 2019
1 parent 56295d9 commit 177c7fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/sealed-secrets/v1alpha1/sealedsecret_expansion.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v1alpha1
import (
"crypto/rand"
"crypto/rsa"
b64 "encoding/base64"
"encoding/base64"
"fmt"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -112,7 +112,7 @@ func NewSealedSecret(codecs runtimeserializer.CodecFactory, pubKey *rsa.PublicKe
if err != nil {
return nil, err
}
s.Spec.EncryptedData[key] = b64.StdEncoding.EncodeToString(ciphertext)
s.Spec.EncryptedData[key] = base64.StdEncoding.EncodeToString(ciphertext)
}

if clusterWide {
Expand Down Expand Up @@ -145,7 +145,7 @@ func (s *SealedSecret) Unseal(codecs runtimeserializer.CodecFactory, privKey *rs

secret.Data = map[string][]byte{}
for key, value := range s.Spec.EncryptedData {
valueBytes, err := b64.StdEncoding.DecodeString(value)
valueBytes, err := base64.StdEncoding.DecodeString(value)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 177c7fa

Please sign in to comment.