Search in sources :

Example 6 with KbsTestVector

use of org.thoughtcrime.securesms.registration.v2.testdata.KbsTestVector in project Signal-Android by signalapp.

the class HashedPinKbsDataTest method getKbsTestVectorList.

private static KbsTestVector[] getKbsTestVectorList() throws IOException {
    try (InputStream resourceAsStream = ClassLoader.getSystemClassLoader().getResourceAsStream("data/kbs_vectors.json")) {
        KbsTestVector[] data = JsonUtil.fromJson(StreamUtil.readFullyAsString(resourceAsStream), KbsTestVector[].class);
        assertTrue(data.length > 0);
        return data;
    }
}
Also used : KbsTestVector(org.thoughtcrime.securesms.registration.v2.testdata.KbsTestVector) InputStream(java.io.InputStream)

Aggregations

KbsTestVector (org.thoughtcrime.securesms.registration.v2.testdata.KbsTestVector)6 Test (org.junit.Test)4 HashedPin (org.whispersystems.signalservice.api.kbs.HashedPin)4 KbsData (org.whispersystems.signalservice.api.kbs.KbsData)4 InputStream (java.io.InputStream)2