summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/testcase/tstRTDigest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Runtime/testcase/tstRTDigest.cpp')
-rw-r--r--src/VBox/Runtime/testcase/tstRTDigest.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/VBox/Runtime/testcase/tstRTDigest.cpp b/src/VBox/Runtime/testcase/tstRTDigest.cpp
index bd579892..5092ea20 100644
--- a/src/VBox/Runtime/testcase/tstRTDigest.cpp
+++ b/src/VBox/Runtime/testcase/tstRTDigest.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2009 Oracle Corporation
+ * Copyright (C) 2009-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -159,6 +159,16 @@ int main(int argc, char **argv)
break;
}
+ case kDigestType_SHA256:
+ {
+ char *pszDigest;
+ int rc = RTSha256DigestFromFile(ValueUnion.psz, &pszDigest, NULL, NULL);
+ if (RT_FAILURE(rc))
+ return Error("RTSha256Digest(%s,) -> %Rrc\n", ValueUnion.psz, rc);
+ RTPrintf("%s %s\n", pszDigest, ValueUnion.psz);
+ RTStrFree(pszDigest);
+ break;
+ }
default:
return Error("The file method isn't implemented for this digest\n");
}