spike-sdk-go/api/url/cipher.go

30 lines
614 B
Go

// \\ SPIKE: Secure your secrets with SPIFFE. — https://spike.ist/
// \\\\\ Copyright 2024-present SPIKE contributors.
// \\\\\\\ SPDX-License-Identifier: Apache-2.0
package url
import (
"net/url"
"github.com/spiffe/spike-sdk-go/api/internal/env"
)
// CipherEncrypt returns the URL for encrypting a text.
func CipherEncrypt() string {
u, _ := url.JoinPath(
env.NexusAPIRoot(),
string(NexusCipherEncrypt),
)
return u
}
// CipherDecrypt returns the URL for decrypting a text.
func CipherDecrypt() string {
u, _ := url.JoinPath(
env.NexusAPIRoot(),
string(NexusCipherDecrypt),
)
return u
}