123456789101112131415161718 |
- package com.chameth.yaotp.algos
-
- import com.natpryce.hamkrest.assertion.assert
- import com.natpryce.hamkrest.equalTo
- import org.junit.Test
-
- class UtilsTest {
-
- @Test
- fun testHmacSha1_withKnownValues() {
- val key = "key".toByteArray()
- val input = "The quick brown fox jumps over the lazy dog".toByteArray()
- val expected = "de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9"
-
- assert.that(hmacSha1(key, input).toHexString(), equalTo(expected))
- }
-
- }
|