Prajna


BytesTools

A set of helper routine for byte[] operations

Functions and values

Function or valueDescription
BytesToHex bytes
Signature: bytes:byte [] -> string

Show byte[] in hexidecimal format.

HashByteArray data
Signature: data:byte [] -> byte []

Compute Hash of the bytearray

HashByteArrayToGuid data
Signature: data:byte [] -> Guid

Compute Hash of the bytearray, and use first 16B of hash to form a GUID

HashLengthPlusByteArray (hasher, data)
Signature: (hasher:HashAlgorithm * data:byte []) -> byte []

Calculate a hash that matches the file hash in PrajnaRemote execution roster. The calculdated hash include length of byte[] plus the content of the byte[].

ReadToEnd stream
Signature: stream:Stream -> byte []

Read an entire stream to byte[]

Fork me on GitHub