# encoding: ascii
# api: powershell
# title: Convert-ToCHexString
# description: 01,00,00,00,d0,8c,9d,df,01,15,d1,11,8c,7a,00,c0,4f,c2,97,eb,\
# version: 0.1
# type: function
# author: bobby thing
# license: CC0
# function: Convert-ToCHexString
# x-poshcode-id: 5920
# x-archived: 2015-07-10T13:21:05
# x-published: 2015-07-07T00:11:00
#
# 01,00,00,00,c3,0c,c6,43,be,8b,e5,4d,a4,44,52,9a,bd,27,73,5a,00,00,00,00,02,\
# 00,00,00,00,00,10,66,00,00,00,01,00,00,20,00,00,00,87,ab,2b,e2,e3,9e,75,c3,\
# be,ba,b4,e6,21,ab,af,66,c8,68,ac,20,a4,4b,a5,84,06,f7,c3,10,36,12,24,52,00,\
# 00,00,00,0e,80,00,00,00,02,00,00,20,00,00,00,ef,48,23,cf,c3,25,08,85,91,8d,\
# a8,e9,80,a5,da,fc,17,11,1d,d2,9e,91,2c,7b,4a,eb,5a,f4,1f,8e,1f,3c,b0,00,00,\
# 00,4c,8a,30,11,7c,e8,ad,9f,6d,ee,2a,65,3e,4a,d4,0c,77,11,22,51,c1,64,5d,c6,\
# 59,41,2d,11,e0,35,ae,fc,10,78,19,0d,e5,06,37,b2,88,ff,c7,8b,74,b7,b4,5c,6b,\
# e0,f5,09,bb,08,1c,a6,2a,f4,ae,df,56,e5,74,c8,7a,8c,96,4b,21,12,aa,c7,c9,d5,\
# 52,bc,cb,b8,af,d3,61,f4,7c,a5,dc,98,70,29,5d,6d,d6,8e,f1,da,35,5f,da,a1,f8,\
# 0a,67,03,93,cc,da,79,2b,28,c6,8a,06,70,0e,ab,88,6f,86,4c,71,f6,02,89,99,af,\
# cd,37,36,51,2f,bd,2c,c7,ce,eb,c8,00,83,e2,e4,e5,4d,cc,95,d6,54,20,f0,c1,f4,\
# 3c,43,d1,58,c0,96,74,ba,1a,6c,89,c6,47,a4,b3,87,d3,51,5b,39,61,15,62,2d,ca,\
# 70,cb,40,00,00,00,45,a0,3d,dd,9f,2f,ee,6b,cc,09,65,50,34,2a,eb,8c,31,cc,3c,\
# c1,55,81,72,42,65,30,46,83,ff,21,67,e4,ca,55,c1,fa,6a,e7,01,19,26,90,28,d0,\
# 60,11,9b,d4,67,b4,35,67,f8,2e,3c,fb,19,db,f2,52,cd,7f,75,a2
#
function Convert-ToCHexString 
{
	param ([String] $str) 
	$ans = ''
	[System.Text.Encoding]::ASCII.GetBytes($str) | % { $ans += "0x{0:X2}, " -f $_ }
	return $ans.Trim(' ',',')
}
