Exemplo n.º 1
0
func (u *User) ExportToUserPlusKeys(idTime keybase1.Time) keybase1.UserPlusKeys {
	ret := keybase1.UserPlusKeys{
		Uid:      u.GetUID(),
		Username: u.GetName(),
	}
	ckf := u.GetComputedKeyFamily()
	if ckf != nil {
		ret.DeviceKeys, ret.PGPKeyCount = ckf.ExportDeviceKeys()
		ret.RevokedDeviceKeys = ckf.ExportRevokedDeviceKeys()
	}

	ret.Uvv = u.ExportToVersionVector(idTime)
	return ret
}
Exemplo n.º 2
0
func (u *User) ExportToUserPlusKeys(idTime keybase1.Time) keybase1.UserPlusKeys {
	ret := keybase1.UserPlusKeys{
		Uid:      u.GetUID(),
		Username: u.GetName(),
	}
	ckf := u.GetComputedKeyFamily()
	if ckf != nil {
		// DeviceKeys is poorly named, so let's deprecate it.
		ret.DeviceKeys = ckf.Export()
		ret.Keys = ret.DeviceKeys
	}

	ret.Uvv = u.ExportToVersionVector(idTime)
	return ret
}