<%
dim form : set form=aspl.form

'form-submitted
if form.postback then

	form.doScroll=true
	
	dim hash
	hash=left(aspl.getRequest("haspw"),50)
	
	'feedback
	dim md5 : set md5=form.field("element")
	md5.add "html","<strong>MD5 hash:</strong><textarea rows=""3"" class=""form-control"">" & aspL.plugin("md5").md5(hash,32) & "</textarea>"
	md5.add "tag","div"
	md5.add "class","alert alert-dark"	
	
	dim sha256 : set sha256=form.field("element")
	sha256.add "html","<strong>sha256 hash:</strong><textarea rows=""3"" class=""form-control"">" & aspL.plugin("sha256").sha256(hash) & "</textarea>"
	sha256.add "tag","div"
	sha256.add "class","alert alert-dark"	

end if	

'##########################################################################################

dim haspw : set haspw=form.field("text")
haspw.add "placeholder","password"
haspw.add "name","haspw"
haspw.add "class","form-control"
haspw.add "maxlength",50
haspw.add "required",true

'##########################################################################################

dim submit : set submit=form.field("submit")
submit.add "style","margin-top:10px"
submit.add "name","btnAction"
submit.add "html","Hash"
submit.add "class","btn btn-secondary"

'##########################################################################################

form.build()

%>