MasterKey is an age key used to Encrypt and Decrypt SOPS' data key.
| 61 | |
| 62 | // MasterKey is an age key used to Encrypt and Decrypt SOPS' data key. |
| 63 | type MasterKey struct { |
| 64 | // Identity used to contain a Bench32-encoded private key. |
| 65 | // Deprecated: private keys are no longer publicly exposed. |
| 66 | // Instead, they are either injected by a (local) key service server |
| 67 | // using ParsedIdentities.ApplyToMasterKey, or loaded from the runtime |
| 68 | // environment (variables) as defined by the `SopsAgeKey*` constants. |
| 69 | Identity string |
| 70 | // Recipient contains the Bench32-encoded age public key used to Encrypt. |
| 71 | Recipient string |
| 72 | // EncryptedKey contains the SOPS data key encrypted with age. |
| 73 | EncryptedKey string |
| 74 | |
| 75 | // parsedIdentities contains a slice of parsed age identities. |
| 76 | // It is used to lazy-load the Identities at-most once. |
| 77 | // It can also be injected by a (local) keyservice.KeyServiceServer using |
| 78 | // ParsedIdentities.ApplyToMasterKey(). |
| 79 | parsedIdentities []age.Identity |
| 80 | // parsedRecipient contains a parsed age public key. |
| 81 | // It is used to lazy-load the Recipient at-most once. |
| 82 | parsedRecipient age.Recipient |
| 83 | } |
| 84 | |
| 85 | // MasterKeysFromRecipients takes a comma-separated list of Bech32-encoded |
| 86 | // public keys, parses them, and returns a slice of new MasterKeys. |
nothing calls this directly
no outgoing calls
no test coverage detected