mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
fix(aes-encryption): update docs
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
This commit is contained in:
parent
0786e67bec
commit
b711ceb4bf
@ -86,6 +86,13 @@ func main() {
|
||||
|
||||
for _, k := range keys {
|
||||
key := []byte(k)
|
||||
if len(key) != 32 {
|
||||
// if key is not a plain txt let's decode
|
||||
var err error
|
||||
if key, err = b64.StdEncoding.DecodeString(string(key)); err != nil || len(key) != 32 {
|
||||
fmt.Errorf("the AES Encryption key must have a length of 32 byte")
|
||||
}
|
||||
}
|
||||
encrypted, _ := endpoint.EncryptText(
|
||||
"heritage=external-dns,external-dns/owner=example,external-dns/resource=ingress/default/example",
|
||||
key,
|
||||
|
Loading…
Reference in New Issue
Block a user