Package pgp contains an implementation of the go.mozilla.org/sops/v3.MasterKey interface that encrypts and decrypts the data key by first trying with the golang.org/x/crypto/openpgp package and if that fails, by calling the "gpg" binary.
MasterKey is a PGP key used to securely store sops' data key by encrypting it and decrypting it
MasterKeysFromFingerprintString takes a comma separated list of PGP fingerprints and returns a slice of new MasterKeys with those fingerprints
NewMasterKeyFromFingerprint takes a PGP fingerprint and returns a new MasterKey with that fingerprint
Decrypt uses PGP to obtain the data key from the EncryptedKey store in the MasterKey and returns it
Encrypt encrypts the data key with the PGP key with the same fingerprint as the MasterKey. It looks for PGP public keys in $PGPHOME/pubring.gpg.
EncryptIfNeeded encrypts the data key with PGP only if it's needed, that is, if it hasn't been encrypted already
EncryptedDataKey returns the encrypted data key this master key holds
NeedsRotation returns whether the data key needs to be rotated or not
SetEncryptedDataKey sets the encrypted data key for this master key
ToMap converts the MasterKey into a map for serialization purposes
ToString returns the string representation of the key, i.e. its fingerprint