// 
// Decompiled by Procyon v0.6.0
// 

package org.bouncycastle.crypto.digests;

import org.bouncycastle.util.Memoable;
import org.bouncycastle.crypto.CryptoServicePurpose;

public final class GOST3411_2012_256Digest extends GOST3411_2012Digest
{
    private static final byte[] IV;
    
    public GOST3411_2012_256Digest(final CryptoServicePurpose cryptoServicePurpose) {
        super(GOST3411_2012_256Digest.IV, cryptoServicePurpose);
    }
    
    public GOST3411_2012_256Digest() {
        super(GOST3411_2012_256Digest.IV, CryptoServicePurpose.ANY);
    }
    
    public GOST3411_2012_256Digest(final GOST3411_2012_256Digest gost3411_2012_256Digest) {
        super(GOST3411_2012_256Digest.IV, gost3411_2012_256Digest.purpose);
        this.reset(gost3411_2012_256Digest);
    }
    
    @Override
    public String getAlgorithmName() {
        return "GOST3411-2012-256";
    }
    
    @Override
    public int getDigestSize() {
        return 32;
    }
    
    @Override
    public int doFinal(final byte[] array, final int n) {
        final byte[] array2 = new byte[64];
        super.doFinal(array2, 0);
        System.arraycopy(array2, 32, array, n, 32);
        return 32;
    }
    
    @Override
    public Memoable copy() {
        return new GOST3411_2012_256Digest(this);
    }
    
    static {
        IV = new byte[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
    }
}
