diff options
author | Sergio Giro <sgiro@google.com> | 2016-02-01 10:41:58 +0000 |
---|---|---|
committer | Sergio Giro <sgiro@google.com> | 2016-02-01 10:41:58 +0000 |
commit | 53b61f9fe9d58034fcc7021137e92460f91b70ce (patch) | |
tree | 90632062175928181977c1ab3ab59951bc1146c3 /bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java | |
parent | 3eebc2629986481f9fc77ab101c0c9b8ff2f2660 (diff) | |
download | bouncycastle-53b61f9fe9d58034fcc7021137e92460f91b70ce.tar.gz |
bouncycastle: Android tree with upstream code for version 1.52
Android tree as of
1af9aad12fedf1d93333e19f5ed0ab86f1cc4e2a
Change-Id: I714fa0954a5d000cd88d1fb78b0b7fe28246d404
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java b/bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java new file mode 100644 index 00000000..ebebbd64 --- /dev/null +++ b/bcprov/src/main/java/org/bouncycastle/crypto/test/NoekeonTest.java @@ -0,0 +1,45 @@ +package org.bouncycastle.crypto.test; + +import org.bouncycastle.crypto.engines.NoekeonEngine; +import org.bouncycastle.crypto.params.KeyParameter; +import org.bouncycastle.util.encoders.Hex; +import org.bouncycastle.util.test.SimpleTest; + +/** + * Noekeon tester + */ +public class NoekeonTest + extends CipherTest +{ + static SimpleTest[] tests = + { + new BlockCipherVectorTest(0, new NoekeonEngine(), + new KeyParameter(Hex.decode("00000000000000000000000000000000")), + "00000000000000000000000000000000", + "b1656851699e29fa24b70148503d2dfc"), + new BlockCipherVectorTest(1, new NoekeonEngine(), + new KeyParameter(Hex.decode("ffffffffffffffffffffffffffffffff")), + "ffffffffffffffffffffffffffffffff", + "2a78421b87c7d0924f26113f1d1349b2"), + new BlockCipherVectorTest(2, new NoekeonEngine(), + new KeyParameter(Hex.decode("b1656851699e29fa24b70148503d2dfc")), + "2a78421b87c7d0924f26113f1d1349b2", + "e2f687e07b75660ffc372233bc47532c") + }; + + NoekeonTest() + { + super(tests, new NoekeonEngine(), new KeyParameter(new byte[16])); + } + + public String getName() + { + return "Noekeon"; + } + + public static void main( + String[] args) + { + runTest(new NoekeonTest()); + } +} |