All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lightningkite.lightningserver.auth.SecureHashKtTest.kt Maven / Gradle / Ivy

The newest version!
package com.lightningkite.lightningserver.auth

import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test
import kotlin.system.measureTimeMillis

class SecureHashKtTest {
    @Test
    fun realTest() {
        val hash = "asdf".secureHash()
        println("Hash is $hash")
        measureTimeMillis {
            assertTrue("asdf".checkHash(hash))
        }.also { println(it) }
        measureTimeMillis {
            assertFalse("asdff".checkHash(hash))
        }.also { println(it) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy