ToMap converts the MasterKey into a map for serialization purposes.
()
| 482 | |
| 483 | // ToMap converts the MasterKey into a map for serialization purposes. |
| 484 | func (key MasterKey) ToMap() map[string]interface{} { |
| 485 | out := make(map[string]interface{}) |
| 486 | out["fp"] = key.Fingerprint |
| 487 | out["created_at"] = key.CreationDate.UTC().Format(time.RFC3339) |
| 488 | out["enc"] = key.EncryptedKey |
| 489 | return out |
| 490 | } |
| 491 | |
| 492 | // TypeToIdentifier returns the string identifier for the MasterKey type. |
| 493 | func (key *MasterKey) TypeToIdentifier() string { |