summaryrefslogtreecommitdiffstats
path: root/app/src/androidTest/java/com/zeapo/pwdstore/OtpTest.java
blob: ec694167ec1f247147583158b2d3f3f5e79a8b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
 * Copyright © 2014-2019 The Android Password Store Authors. All Rights Reserved.
 * SPDX-License-Identifier: GPL-3.0-only
 */
package com.zeapo.pwdstore;

import com.zeapo.pwdstore.utils.Otp;
import junit.framework.TestCase;

public class OtpTest extends TestCase {
    public void testOtp() {
        String code = Otp.calculateCode("JBSWY3DPEHPK3PXP", 0L, "sha1", "s");
        assertEquals("282760", code);
    }
}