I have found the above code on generating passwords but when I converted the whole project it displays 2 warnings that the code was obsolete but when I search google I didnt found any fix for that warning.Code:' Use the password to generate key bytes. Private Sub MakeKeyAndIV(ByVal password As String, ByVal key_size_bits As Integer, ByVal block_size_bits As Integer, ByRef key As Byte(), ByRef iv As Byte()) Dim password_derive_bytes As New PasswordDeriveBytes( _ password, Nothing, "SHA384", 1000) key = password_derive_bytes.GetBytes(key_size_bits \ 8) iv = password_derive_bytes.GetBytes(block_size_bits \ 8) End Sub Warning 1 'Public Overrides Function GetBytes(cb As Integer) As Byte()' is obsolete: 'Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.'.




Reply With Quote
