gaetan
10/29/2015, 2:21 PMfun String.toSha1():String {
val toDigest = this
val digest = with(MessageDigest.getInstance("SHA-1")) {
update(toDigest.toByteArray("UTF-8")) //todo inline toDigest
digest()
}
return BigInteger(1, digest).toString(16)
}
Is there a way of inlining the toDigest value? Using this
does not work because of the lambda.