Bouncy Castle Cryptography Library 1.87

org.bouncycastle.crypto.test
Class SM9KeyUsageTest

java.lang.Object
  extended byorg.bouncycastle.util.test.SimpleTest
      extended byorg.bouncycastle.crypto.test.SM9KeyUsageTest
All Implemented Interfaces:
Test

public class SM9KeyUsageTest
extends SimpleTest

Tests of the SM9 encryption key-usage check: a user key declared for one of the KEM and decryption is refused for the other on every use, and within one JVM a user key is held to the first of the two it is used for, recognised by its value rather than by its object, and refused for the other unless Properties.SM9_ALLOW_MULTI_USE is set.


Nested Class Summary
 
Nested classes inherited from class org.bouncycastle.util.test.SimpleTest
SimpleTest.TestExceptionOperation
 
Constructor Summary
SM9KeyUsageTest()
           
 
Method Summary
 java.lang.String getName()
           
static void main(java.lang.String[] args)
           
 void performTest()
           
 
Methods inherited from class org.bouncycastle.util.test.SimpleTest
areEqual, areEqual, areEqual, fail, fail, fail, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isEquals, isTrue, isTrue, perform, runTest, runTest, runTests, runTests, testException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SM9KeyUsageTest

public SM9KeyUsageTest()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface Test
Specified by:
getName in class SimpleTest

performTest

public void performTest()
                 throws java.lang.Exception
Specified by:
performTest in class SimpleTest
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)

Bouncy Castle Cryptography Library 1.87