view dcrypt/misc/Checksum.d @ 23:4589f8c5eb3c

Replaced dcrypt.crypto.Util with dcrypt.misc.Bitwise and dcrypt.misc.ByteConverter. Altered all dependent files to reflect changes.
author Thomas Dixon <reikon@reikon.us>
date Sat, 14 Feb 2009 19:58:20 -0500
parents 5ce3012f1def
children ad687db713a4
line wrap: on
line source

/**
 * This file is part of the dcrypt project.
 *
 * Copyright: Copyright (C) dcrypt contributors 2008. All rights reserved.
 * License:   MIT
 * Authors:   Thomas Dixon
 */

module dcrypt.misc.Checksum;

/** Base class for 32-bit checksums */
abstract class Checksum {
    /**
     * Compute a checksum.
     * 
     * Params:
     *     input_ = Data to be processed.
     *     start = Starting value for the checksum.
     *     
     * Returns: The computed 32 bit checksum.
     */
    uint compute(void[] input_, uint start);
    
    /** Returns: The name of the checksum algorithm. */
    char[] name();
}