Skip to content

[request] encrypt package #903

Open

Description

@valorl

Hi,

Similarly to the decrypt package, would it be possible to do something similar for encryption?
I would like to SOPS-encrypt files from a self-contained internal Go binary.
Any thoughts?

Activity

  1. politician commented on Sep 19, 2021

    @politician

    I would really much like to see this also.
    I am working on a complete stack automating infrastructure as much as possible using Terraform and while I can generate GPG keys, and decrypt SOPS files, it's a shame I cannot encrypt them natively.

  2. dee-kryvenko commented on Oct 5, 2021

    @dee-kryvenko

    I'm a creator of https://github.com/plumber-cd/terraform-backend-git and I am interested in using this project as a library to encrypt and decrypt Terraform state files at rest. I haven't had a chance to look into the code yet, but does this means I can't use this as a library to encrypt at all or does it means it's just going to be harder / hacky?

  3. isaacsanders commented on Feb 21, 2023

    @isaacsanders

    Can you not use the packages used in this file? https://github.com/mozilla/sops/blob/master/cmd/sops/encrypt.go

  4. valorl commented on Feb 22, 2023

    @valorl
    Author

    Likely, but there's still a considerable amount of code in main (not just in this file) here that you'd have to copy / re-implement yourself. Would be nice to have an interface that's actually designed to be consumed outside of this CLI, also from the support/stability perspective.

  5. manute commented on May 2, 2026

    @manute
    Contributor

    Hey,

    I am working with this project and I would love to have an encrypt pkg, so I just created this #2166 to export it and change all the references to it. Please, any feedback really appreciated, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions