I'm trying to use this to encrypt a GitHub secret (reference) using sealed boxes, but am getting 500's back from the enterprise github server when I actually make the HTTP PUT call. Here's my function that I'm using to encrypt:
fun encryptSecret(secret: String): String {
val pub = "MyGhPubKeyThatIveRemoved"
return Base64.getEncoder().encodeToString(
LazySodiumJava(SodiumJava(), StandardCharsets.UTF_8).cryptoBoxSealEasy(
secret, Key.fromPlainString(pub)
).toByteArray()
)
I'm not actually sure if I'm encrypting wrong, or if there's another issue with my code, the 500 that I get back from GitHub doesn't seem too helpful so far.
FYI, this function is largely derived from here.
I'm trying to use this to encrypt a GitHub secret (reference) using sealed boxes, but am getting 500's back from the enterprise github server when I actually make the HTTP PUT call. Here's my function that I'm using to encrypt:
I'm not actually sure if I'm encrypting wrong, or if there's another issue with my code, the 500 that I get back from GitHub doesn't seem too helpful so far. FYI, this function is largely derived from here.