Golang, Kubernetes, Secrets, Cryptography.
x509.ParsePKIXPublicKey(block.Bytes) if err != nil { log.Fatalf("Failed to parse pub key:%v", err) } pub := pubInterface.(*rsa.PublicKey) s, err := rsa.EncryptOAEP(sha256.New(), rand.Reader, pub, []byte(text), []byte("mylabel")) if err != nil { log.Fatalf("Failed to encrypt:%v", err) }