T GetUserByKey <T>(string key) where T : User { string UserJson; if (RSAEncryption.TryDecrypt(Base64Encryption.Decrypt(PrivateKey), key, out UserJson)) { return(UserJson.ToObj <T>()); } else { return(null); } }
public static string GetSrc(ServiceUser user) { return(RSAEncryption.Encrypt(Base64Encryption.Decrypt(PublicKey), user.ToJson())); }