/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/VS_Snippets_CLR/generatingahash/vb/program.vb
19 строк
566 B
Petr Onderka
Modernize SHA-256 samples (#33254)
02 янв 2023, 17:57
Не верифицирован
02 янв 2023, 17:57
d6947a3
Код
Авторство
О чём код?
'<Snippet1> Imports System.Security.Cryptography Imports System.Text Module Program Sub Main() Dim messageString As String = "This is the original message!" 'Convert the string into an array of bytes. Dim messageBytes As Byte() = Encoding.UTF8.GetBytes(messageString) 'Create the hash value from the array of bytes. Dim hashValue As Byte() = SHA256.HashData(messageBytes) 'Display the hash value to the console. Console.WriteLine(Convert.ToHexString(hashValue)) End Sub End Module '</Snippet1>