@@ -86,20 +86,6 @@ public static Argon2Parameters GetDefaultArgon2Parameters()
8686 return Argon2Parameters . FromByteArray ( rawParameters ) ;
8787 }
8888
89- /// <summary>
90- /// Encrypts the data (which will be encoded into a UTF8 byte array) with the provided key.
91- /// </summary>
92- /// <param name="data">The data to encrypt.</param>
93- /// <param name="key">The key to use for encryption.</param>
94- /// <param name="aad">Additional authenticated data. (Optional).</param>
95- /// <param name="version">The cipher version to use. (Latest is recommended).</param>
96- /// <returns>Returns the encryption result as a base 64 encoded string.</returns>
97- [ Obsolete ( "This method has been deprecated. Use EncryptWithKeyAsBase64String instead." ) ]
98- public static string EncryptWithKeyAsString ( string data , byte [ ] key , byte [ ] aad = null , CipherTextVersion version = CIPHERTEXT_VERSION )
99- {
100- return EncryptWithKeyAsBase64String ( data , key , aad , version ) ;
101- }
102-
10389 /// <summary>
10490 /// Encrypts the data (which will be encoded into a UTF8 byte array) with the provided key.
10591 /// </summary>
@@ -315,20 +301,6 @@ public static byte[] DecryptAsymmetric(byte[] data, byte[] privateKey, byte[] aa
315301 return result ;
316302 }
317303
318- /// <summary>
319- /// Encrypts the data with the provided key.
320- /// </summary>
321- /// <param name="data">The data to encrypt.</param>
322- /// <param name="key">The key to use for encryption.</param>
323- /// <param name="aad">Additional authenticated data. (Optional).</param>
324- /// <param name="version">The cipher version to use. (Latest is recommended).</param>
325- /// <returns>Returns the encryption result as a base 64 encoded string.</returns>
326- [ Obsolete ( "This method has been deprecated. Use EncryptWithKeyAsBase64String instead." ) ]
327- public static string EncryptWithKeyAsString ( byte [ ] data , byte [ ] key , byte [ ] aad = null , CipherTextVersion version = CIPHERTEXT_VERSION )
328- {
329- return EncryptWithKeyAsBase64String ( data , key , aad , version ) ;
330- }
331-
332304 /// <summary>
333305 /// Encrypts the data with the provided key.
334306 /// </summary>
@@ -359,21 +331,6 @@ public static byte[] EncryptWithKey(byte[] data, byte[] key, byte[] aad = null,
359331 return cipher ;
360332 }
361333
362- /// <summary>
363- /// Encrypts the data with the provided password (which will be encoded into a UTF8 byte array and derived).
364- /// </summary>
365- /// <param name="data">The data to encrypt.</param>
366- /// <param name="password">The password to use for encryption.</param>
367- /// <param name="iterations">The number of iterations used to derive the password. 10 000 Recommended by NIST.</param>
368- /// <param name="aad">Additional authenticated data. (Optional).</param>
369- /// <param name="cipherTextVersion">The cipher version to use. (Latest is recommended).</param>
370- /// <returns>Returns the encryption result as a base 64 encoded string.</returns>
371- [ Obsolete ( "This method has been deprecated. Use EncryptWithPasswordAsBase64String instead." ) ]
372- public static string EncryptWithPasswordAsString ( byte [ ] data , string password , uint iterations = 10000 , byte [ ] aad = null , CipherTextVersion cipherTextVersion = CIPHERTEXT_VERSION )
373- {
374- return EncryptWithPasswordAsBase64String ( data , password , iterations , aad , cipherTextVersion ) ;
375- }
376-
377334 /// <summary>
378335 /// Encrypts the data with the provided password (which will be encoded into a UTF8 byte array and derived).
379336 /// </summary>
@@ -743,21 +700,6 @@ public static byte[] EncryptAsymmetric(byte[] data, byte[] publicKey, byte[] aad
743700 return result ;
744701 }
745702
746- /// <summary>
747- /// Encrypts the data (which will be encoded into a UTF8 byte array) with the provided password (which will be encoded into a UTF8 byte array and derived).
748- /// </summary>
749- /// <param name="data">The data to encrypt.</param>
750- /// <param name="password">The password to use for encryption.</param>
751- /// <param name="aad">Additional authenticated data. (Optional).</param>
752- /// <param name="iterations">The number of iterations used to derive the password. 10 000 Recommended by NIST.</param>
753- /// <param name="cipherTextVersion">The cipher version to use. (Latest is recommended).</param>
754- /// <returns>Returns the encryption result as a base 64 encoded string.</returns>
755- [ Obsolete ( "This method has been deprecated. Use EncryptWithPasswordAsBase64String instead." ) ]
756- public static string EncryptWithPasswordAsString ( string data , string password , byte [ ] aad = null , uint iterations = 10000 , CipherTextVersion cipherTextVersion = CIPHERTEXT_VERSION )
757- {
758- return EncryptWithPasswordAsBase64String ( data , password , iterations , aad , cipherTextVersion ) ;
759- }
760-
761703 /// <summary>
762704 /// Encrypts the data (which will be encoded into a UTF8 byte array) with the provided password (which will be encoded into a UTF8 byte array and derived).
763705 /// </summary>
@@ -890,19 +832,6 @@ public static byte[] EncryptWithPassword(string data, string password, uint iter
890832 return cipher ;
891833 }
892834
893- /// <summary>
894- /// Decrypts the base64 string with the provided key.
895- /// </summary>
896- /// <param name="b64data">The base 64 string to decrypt.</param>
897- /// <param name="key">The key to use for decryption.</param>
898- /// <param name="aad">Additional authenticated data. (Optional).</param>
899- /// <returns>Returns the decryption result as a UTF8 encoded string.</returns>
900- [ Obsolete ( "This method has been deprecated. Use DecryptWithKeyAsUtf8String instead." ) ]
901- public static string DecryptWithKeyAsString ( string b64data , byte [ ] key , byte [ ] aad = null )
902- {
903- return DecryptWithKeyAsUtf8String ( b64data , key , aad ) ;
904- }
905-
906835 /// <summary>
907836 /// Decrypts the base64 string with the provided key.
908837 /// </summary>
@@ -933,19 +862,6 @@ public static byte[] DecryptWithKey(string b64data, byte[] key, byte[] aad = nul
933862 return result ;
934863 }
935864
936- /// <summary>
937- /// Decrypts the data with the provided key.
938- /// </summary>
939- /// <param name="data">The data to decrypt.</param>
940- /// <param name="key">The key to use for decryption.</param>
941- /// <param name="aad">Additional authenticated data. (Optional).</param>
942- /// <returns>Returns the decryption result as a UTF8 encoded string.</returns>
943- [ Obsolete ( "This method has been deprecated. Use DecryptWithKeyAsUtf8String instead." ) ]
944- public static string DecryptWithKeyAsString ( byte [ ] data , byte [ ] key , byte [ ] aad = null )
945- {
946- return DecryptWithKeyAsUtf8String ( data , key , aad ) ;
947- }
948-
949865 /// <summary>
950866 /// Decrypts the data with the provided key.
951867 /// </summary>
@@ -976,20 +892,6 @@ public static byte[] DecryptWithKey(byte[] data, byte[] key, byte[] aad = null,
976892 return result ;
977893 }
978894
979- /// <summary>
980- /// Decrypts the data with the provided password (which will be encoded into a UTF8 byte array and derived).
981- /// </summary>
982- /// <param name="data">The data to decrypt.</param>
983- /// <param name="password">The password to use for decryption.</param>
984- /// <param name="iterations">The number of iterations used to derive the password.</param>
985- /// <param name="aad">Additional authenticated data. (Optional).</param>
986- /// <returns>Returns the decryption result as a UTF8 encoded string.</returns>
987- [ Obsolete ( "This method has been deprecated. Use DecryptWithPasswordAsUtf8String instead." ) ]
988- public static string DecryptWithPasswordAsString ( byte [ ] data , string password , uint iterations = 10000 , byte [ ] aad = null )
989- {
990- return DecryptWithPasswordAsUtf8String ( data , password , iterations , aad ) ;
991- }
992-
993895 /// <summary>
994896 /// Decrypts the data with the provided password (which will be encoded into a UTF8 byte array and derived).
995897 /// </summary>
@@ -1040,20 +942,6 @@ public static string DecryptWithPasswordAsUtf8String(byte[] data, string passwor
1040942 return Utils . ByteArrayToUtf8String ( result ) ;
1041943 }
1042944
1043- /// <summary>
1044- /// Decrypts the base 64 data (which will be decoded to the original data) with the provided password (which will be encoded into a UTF8 byte array and derived).
1045- /// </summary>
1046- /// <param name="b64data">The data to decrypt.</param>
1047- /// <param name="password">The password to use for decryption.</param>
1048- /// <param name="iterations">The number of iterations used to derive the password.</param>
1049- /// <param name="aad">Additional authenticated data. (Optional).</param>
1050- /// <returns>Returns the decryption result as a UTF8 encoded string.</returns>
1051- [ Obsolete ( "This method has been deprecated. Use DecryptWithPasswordAsUtf8String instead." ) ]
1052- public static string DecryptWithPasswordAsString ( string b64data , string password , uint iterations = 10000 , byte [ ] aad = null )
1053- {
1054- return DecryptWithPasswordAsUtf8String ( b64data , password , iterations , aad ) ;
1055- }
1056-
1057945 /// <summary>
1058946 /// Join multiple shares to regenerate a shared secret.
1059947 /// </summary>
@@ -1301,23 +1189,6 @@ public static byte[] DecryptWithPassword(string b64data, string password, uint i
13011189 return result ;
13021190 }
13031191
1304- /// <summary>
1305- /// Generates an API key.
1306- /// </summary>
1307- /// <returns>An API key formated as a Guid.</returns>
1308- [ Obsolete ( "This method has been deprecated. Use Managed.GenerateKey instead." ) ]
1309- public static Guid GenerateAPIKey ( )
1310- {
1311- byte [ ] apiKey = GenerateKey ( 16 ) ;
1312-
1313- if ( apiKey == null )
1314- {
1315- return Guid . Empty ;
1316- }
1317-
1318- return new Guid ( apiKey ) ;
1319- }
1320-
13211192 /// <summary>
13221193 /// Decrypts the data with the provided key. No exceptions are thrown in case of failure.
13231194 /// </summary>
0 commit comments