MCPcopy Index your code
hub / github.com/getsops/sops / MasterKeyFromRecipient

Function MasterKeyFromRecipient

age/keysource.go:119–129  ·  view source on GitHub ↗

MasterKeyFromRecipient takes a Bech32-encoded age public key, parses it, and returns a new MasterKey.

(recipient string)

Source from the content-addressed store, hash-verified

117// MasterKeyFromRecipient takes a Bech32-encoded age public key, parses it, and
118// returns a new MasterKey.
119func MasterKeyFromRecipient(recipient string) (*MasterKey, error) {
120 recipient = strings.TrimSpace(recipient)
121 parsedRecipient, err := parseRecipient(recipient)
122 if err != nil {
123 return nil, err
124 }
125 return &MasterKey{
126 Recipient: recipient,
127 parsedRecipient: parsedRecipient,
128 }, nil
129}
130
131// ParsedIdentities contains a set of parsed age identities.
132// It allows for creating a (local) keyservice.KeyServiceServer which parses

Calls 1

parseRecipientFunction · 0.85