public static bool TryDeserializeProviderUserId(string data, out string providerName, out string providerUserId) { if (data == null) { throw new ArgumentNullException("data"); } return(ProviderUserIdSerializationHelper.UnprotectData(data, out providerName, out providerUserId)); }
/// <summary> /// Securely serializes a providerName/providerUserId pair. /// </summary> /// <param name="providerName">The provider name.</param> /// <param name="providerUserId">The provider-specific user id.</param> /// <returns>A cryptographically protected serialization of the inputs which is suitable for round-tripping.</returns> /// <remarks>Do not persist the return value to permanent storage. This implementation is subject to change.</remarks> public static string SerializeProviderUserId(string providerName, string providerUserId) { if (providerName == null) { throw new ArgumentNullException("providerName"); } if (providerUserId == null) { throw new ArgumentNullException("providerUserId"); } return(ProviderUserIdSerializationHelper.ProtectData(providerName, providerUserId)); }