Digest

protected expect constructor(algorithm: String, blockSize: Int, digestLength: Int)(source)

Creates a new Digest for the specified parameters.

Parameters

algorithm
blockSize
digestLength

Throws

when:


protected expect constructor(other: Digest)(source)

Creates a new Digest from other, copying its state.

Implementors of Digest should have a private secondary constructor that is utilized by its copy implementation.

e.g.

public class SHA256: Digest {

    // ...

    private constructor(other: SHA256): super(other) {
        // Copy implementation details...
    }

    // Notice the updated return type
    public override fun copy(): SHA256 = SHA256(this)

    // ...
}
protected actual constructor(algorithm: String, blockSize: Int, digestLength: Int)(source)

Creates a new Digest for the specified parameters.

Parameters

algorithm
blockSize
digestLength

Throws

when:


protected actual constructor(other: Digest)(source)

Creates a new Digest from other, copying its state.

Implementors of Digest should have a private secondary constructor that is utilized by its copy implementation.

e.g.

public class SHA256: Digest {

    // ...

    private constructor(other: SHA256): super(other) {
        // Copy implementation details...
    }

    // Notice the updated return type
    public override fun copy(): SHA256 = SHA256(this)

    // ...
}
protected actual constructor(algorithm: String, blockSize: Int, digestLength: Int)(source)

Creates a new Digest for the specified parameters.

Parameters

algorithm
blockSize
digestLength

Throws

when:


protected actual constructor(other: Digest)(source)

Creates a new Digest from other, copying its state.

Implementors of Digest should have a private secondary constructor that is utilized by its copy implementation.

e.g.

public class SHA256: Digest {

    // ...

    private constructor(other: SHA256): super(other) {
        // Copy implementation details...
    }

    // Notice the updated return type
    public override fun copy(): SHA256 = SHA256(this)

    // ...
}