Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Public Overrides Function GetBytes() As Byte() is obsolete

What does the poet try to say?

Public Overrides Function GetBytes() As Byte() is obsolete: Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.

Should i replace this one...

Dim keyBytes As Byte()
keyBytes = password.GetBytes(keySize / 8)

...with what?

like image 361
OrElse Avatar asked Sep 11 '25 08:09

OrElse


1 Answers

You are missing crucial part of your code. It is that part that declares password to be PasswordDeriveBytes. Change that to Rfc2898DeriveBytes and you are good.

like image 79
Josip Medved Avatar answered Sep 14 '25 01:09

Josip Medved