CryptoSys PKI Pro Manual

Hash.BytesFromBytes Method

Create hash digest in byte format of byte input.

Syntax

[C#]
public static byte[] BytesFromBytes(
   byte[] message,
   HashAlgorithm hashAlg 
)
[VB]
Public Shared Function BytesFromBytes (
   message As Byte(),
   hashAlg As HashAlgorithm 
) As Byte()

Parameters

message  Byte
Message data in byte format
hashAlg  HashAlgorithm
Hash algorithm to be used

Return Value

Byte
Message digest in byte format

Example

byte[] m = { 0x61, 0x62, 0x63 };  // "abc" in byte array
byte[] h = Hash.BytesFromBytes(m, HashAlgorithm.Sha256);
Console.WriteLine("SHA-256(b'abc')=\n" + h.ToHex());
// BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD

See Also

VB6/C equivalent: HASH_Bytes

[Contents] [Index]

[PREV: General.Version Method...]   [Contents]   [Index]   
   [NEXT: Hash.BytesFromFile Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.