/// <summary> /// Decrypt method implementation /// </summary> public static string Decrypt(string encryptedText, string KeyString) { if (!encryptedText.StartsWith("0x01")) { throw new SharePointIdentityCryptographicException("Message Unknown ! or never never encrypted by SharePoint Indentity Service !"); } encryptedText = encryptedText.Substring(4); string cipherText = CipherUtility.Decrypt <AesManaged>(encryptedText, KeyString, "BABE"); return(cipherText); }