Sample code for 30+ languages & platforms
Classic ASP Requires Chilkat v11.6.0+

Compute Glacier SHA-256 Linear Hash

See more Amazon Glacier Examples

For existing Amazon Glacier vault customers. The standalone vault service is closed to new customers. These examples use its REST API version 2012-06-01, not the S3 bucket APIs used by S3 Glacier storage classes. See AWS service guidance.

Computes ordinary SHA-256 over the exact file bytes, used as the SigV4 payload hash. This differs from the Glacier tree hash for files larger than 1 MiB. Keep the file unchanged between hashing and uploading.

AWS reference

Chilkat Classic ASP Downloads

Classic ASP
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
'  Assumes Chilkat is unlocked. See Global Unlock Sample.
set crypt = Server.CreateObject("Chilkat.Crypt2")
crypt.HashAlgorithm = "sha256"
crypt.EncodingMode = "hexlower"
hashHex = crypt.HashFileENC("qa_data/jpg/penguins.jpg")
If (crypt.LastMethodSuccess <> 1) Then
    Response.Write "<pre>" & Server.HTMLEncode( "Hashing failed; check that the file exists and is readable.") & "</pre>"
    Response.End
End If

Response.Write "<pre>" & Server.HTMLEncode( hashHex) & "</pre>"

%>
</body>
</html>