WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:CryptoChecksum
Description:
Id:CryptoChecksum
Category:accessor
Identifier Syntax

CryptoChecksum is an accessor using Active URI syntax with the following base identifiers:

Base
active:md5sum
active:sha1sum
active:sha256sum
active:sha384sum
active:sha512sum
active:md2sum
active:sha1
active:sha256
active:sha384
active:sha512
active:md2
active:md5

and the following arguments: (for more details on argument passing details see here)

ArgumentRulesTypingDescription
operand
Mandatory
Representation (java.lang.Object)resource to generate checksum for
Request Verbs

The following verb is supported:

Verb
SOURCE
Response

The response representation of this accessor for SOURCE requests is unknown.

This accessor throws no documented exceptions.

Import Requirements

To use CryptoChecksum accessor you must import the module urn:org:netkernel:mod:security:

<import>
  <uri>urn:org:netkernel:mod:security</uri>
</import>

The CryptoChecksum accessor computes cryptographic message digests (or checksums) on the resource specified by the operand which is SOURCEd as an IReadableBinaryStreamRepresentation.

Responses are returned as a hexadecimal encoding within a java.lang.String.

This accessor supports various checksum algorithms which are implemented using the java.security.MessageDigest class. The Wikipedia page Cryptographic_hash_function contains a good comparison of the strengths and weaknesses of the various algorithms.

Example

The following code requests the computation of a MD5 hash:

request = context.createRequest("active:md5");
request.addArgumentByValue("operand", "abc")
hash = context.issueRequest(request);

The source value is:

abc
the resulting hash is:
900150983cd24fb0d6963f7d28e17f72