I'm converting this VB.NET code to Visual Cobol but I'm
with difficulty in the declaration: declare a() as binary-char unsigned occurs any = type Encoding::UTF8::GetBytes(SourceText)
VB.NET code running
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim SourceText As String = "1234567890"
Dim a() As Byte
a = Encoding.UTF8.GetBytes(SourceText)
Dim b As Byte()
Dim c As New SHA512Managed
b = c.ComputeHash(a)
Dim d As String = Convert.ToBase64String(b)
Visual Cobol code with error.
method-id button1_Click final private.
procedure division using by value sender as object e as type System.EventArgs.
declare sourceText as string = "1234567890"
declare a() as binary-char unsigned occurs any = type Encoding::UTF8::GetBytes(SourceText)
declare b as binary-char unsigned occurs any
declare c as type SHA512Managed
set b to c::ComputeHash(a)
declare d as string = type Convert::ToBase64String(b)
set tbxOut::Text to d