コード例 #1
0
ファイル: ServiceUserHelper.cs プロジェクト: wkxuan/code
        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);
            }
        }
コード例 #2
0
ファイル: ServiceUserHelper.cs プロジェクト: wkxuan/code
 public static string GetSrc(ServiceUser user)
 {
     return(RSAEncryption.Encrypt(Base64Encryption.Decrypt(PublicKey), user.ToJson()));
 }