@@ -13,7 +13,7 @@ different from those types, while implementing the same interfaces (`Algorithm`,
1313Output for an ` Xof ` is done by reading, instead.
1414
1515``` kotlin
16- // Using SHAKE128 from hash repo as an example
16+ // Using SHAKE128 from KotlinCrypto/ hash repo as an example
1717import org.kotlincrypto.hash.sha3.SHAKE128
1818
1919fun main () {
@@ -82,19 +82,19 @@ fun main() {
8282```
8383
8484``` kotlin
85- // Using KMAC128 from MACs repo as an example
85+ // Using CryptoRand from KotlinCrypto/random repo as an example
86+ import org.kotlincrypto.random.CryptoRand
87+ // Using KMAC128 from KotlinCrypto/MACs repo as an example
8688import org.kotlincrypto.macs.kmac.KMAC128
87- // Using SecureRandom from the secure-random repo as an example
88- import org.kotlincrypto.SecureRandom
8989
9090fun main () {
91- val key = SecureRandom ().nextBytesOf( 100 )
91+ val key = CryptoRand . Default .nextBytes( ByteArray ( 100 ) )
9292 val kmacXof: Xof <KMAC128 > = KMAC128 .xOf(key)
9393
9494 // If Xof is for a Mac that implements ReKeyableXofAlgorithm,
9595 // reinitialize the instance via the `Xof.Companion.reset`
9696 // extension function for reuse.
97- val newKey = SecureRandom ().nextBytesOf( 100 )
97+ val newKey = CryptoRand . Default .nextBytes( ByteArray ( 100 ) )
9898 kmacXof.reset(newKey = newKey)
9999
100100 // Or zero out key material before dereferencing
0 commit comments