org.python.modules

## Class SHA224Digest

- java.lang.Object
- - java.security.MessageDigestSpi
  - - java.security.MessageDigest
    - - org.python.modules.SHA224Digest

    public class SHA224Digest
    extends MessageDigest

SHA-224 as described in RFC 3874. This introduces the SHA224 Digest which has been omitted from the JDK `java.security`. This implementation has been borrowed from the Bouncy Castle implementation of SHA2 algorithms. Since they are MIT Licensed, they are compatible with this project. Their mandatory copyright notice follows.

     Copyright (c) 2000 - 2011 The Legion Of The Bouncy Castle
     (http://www.bouncycastle.org)

     Permission is hereby granted, free of charge, to any person obtaining a copy
     of this software and associated documentation files (the "Software"), to deal
     in the Software without restriction, including without limitation the rights
     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     copies of the Software, and to permit persons to whom the Software is
     furnished to do so, subject to the following conditions:

     The above copyright notice and this permission notice shall be included in
     all copies or substantial portions of the Software.

     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     SOFTWARE.

### Constructor Summary

Constructors
Constructor and Description
`SHA224Digest()` Standard constructor
`SHA224Digest(SHA224Digest t)` Copy constructor.

### Method Summary

Methods
`static int` `bigEndianToInt(byte[] bs, int off)`
`static long` `bigEndianToLong(byte[] bs, int off)`
`Object` `clone()`
`int` `doFinal(byte[] out, int outOff)`
`void` `finish()`
`String` `getAlgorithmName()`
`int` `getByteLength()`
`int` `getDigestSize()`
`static void` `intToBigEndian(int n, byte[] bs, int off)`
`static void` `longToBigEndian(long n, byte[] bs, int off)`
`void` `reset()`
`void` `update(byte in)`
`void` `update(byte[] in, int inOff, int len)`

### Methods inherited from class java.security.MessageDigest

`digest, digest, digest, getAlgorithm, getDigestLength, getInstance, getInstance, getInstance, getProvider, isEqual, toString, update, update`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SHA224Digest

    public SHA224Digest()

Standard constructor

#### SHA224Digest

    public SHA224Digest(SHA224Digest t)

Copy constructor. This will copy the state of the provided message digest.

### Method Detail

#### update

    public void update(byte in)

Overrides:
  `update` in class `MessageDigest`

#### update

    public void update(byte[] in,
              int inOff,
              int len)

Overrides:
  `update` in class `MessageDigest`

#### finish

    public void finish()

#### getByteLength

    public int getByteLength()

#### getAlgorithmName

    public String getAlgorithmName()

#### getDigestSize

    public int getDigestSize()

#### doFinal

    public int doFinal(byte[] out,
              int outOff)

#### reset

    public void reset()

Overrides:
  `reset` in class `MessageDigest`

#### clone

    public Object clone()
                 throws CloneNotSupportedException

Overrides:
  `clone` in class `MessageDigest`
Throws:
  `CloneNotSupportedException`

#### bigEndianToInt

    public static int bigEndianToInt(byte[] bs,
                     int off)

#### intToBigEndian

    public static void intToBigEndian(int n,
                      byte[] bs,
                      int off)

#### bigEndianToLong

    public static long bigEndianToLong(byte[] bs,
                       int off)

#### longToBigEndian

    public static void longToBigEndian(long n,
                       byte[] bs,
                       int off)