A GitHub repository uses GitHub Actions and stores access keys as encrypted secrets. You plan to update the secrets via the GitHub REST API. Which encryption library should you use to encrypt the secrets before including them in the API call?
Choose an answer
Tap an option to check your answer.
Correct answer: libsodium.
Why this is the answer
GitHub's REST API for secrets encryption specifically requires the use of libsodium's sealedbox functionality. This ensures that the secrets are encrypted with the repository's public key, making them secure during transit and only decryptable by GitHub. CryptoNet is a .NET cryptography library, BouncyCastle is a general-purpose cryptographic library often used in Java and C, and hashlib is a Python module for hashing, not encryption. While these are valid cryptographic tools, they do not provide the specific encryption scheme (libsodium's sealedbox) mandated by GitHub for this API. Using any of these alternatives would result in an encryption format that GitHub's API would not recognize or be able to decrypt, leading to a failed API call.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed