intarsys runtime library

de.intarsys.tools.digest
Interface IDigestEnvironment

All Known Implementing Classes:
StandardDigestEnvironment

public interface IDigestEnvironment

Factory methods for IDigest and IDigester.


Method Summary
 IDigest createDigest(String algorithmName, byte[] bytes)
          An IDigest object from an algorithm name and the raw bytes.
 IDigester createDigester(String algorithmName)
          An IDigester for the given "algorithmName".
 IDigest decode(byte[] bytes)
          Decode an DER encoded representation to an IDigest.
 byte[] encode(IDigest digest)
          Encode an IDigest to a DER representation.
 

Method Detail

createDigest

IDigest createDigest(String algorithmName,
                     byte[] bytes)
An IDigest object from an algorithm name and the raw bytes.

Parameters:
algorithmName -
bytes -
Returns:
An IDigest object from an algorithm name and the raw bytes.

createDigester

IDigester createDigester(String algorithmName)
                         throws NoSuchAlgorithmException
An IDigester for the given "algorithmName".

Parameters:
algorithmName -
Returns:
An IDigester for the given "algorithmName".
Throws:
NoSuchAlgorithmException

decode

IDigest decode(byte[] bytes)
               throws IOException
Decode an DER encoded representation to an IDigest.

Parameters:
bytes -
Returns:
The decoded IDigest
Throws:
IOException - If no decoder installed or "bytes" are not a correct encoded DER representation.

encode

byte[] encode(IDigest digest)
              throws IOException
Encode an IDigest to a DER representation.

Parameters:
digest -
Returns:
The DER encoded IDigest
Throws:
IOException - If no decoder installed.

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.