Digest
Creates a new Digest for the specified parameters.
Parameters
Throws
when:
algorithm is blank
blockSize is less than or equal to 0
blockSize is not a factor of 8
digestLength is negative
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)
// ...
}
Creates a new Digest for the specified parameters.
Parameters
Throws
when:
algorithm is blank
blockSize is less than or equal to 0
blockSize is not a factor of 8
digestLength is negative
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)
// ...
}
Creates a new Digest for the specified parameters.
Parameters
Throws
when:
algorithm is blank
blockSize is less than or equal to 0
blockSize is not a factor of 8
digestLength is negative
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)
// ...
}