org.bouncycastle.jce.provider.test
Class PBETest
java.lang.Object
org.bouncycastle.util.test.SimpleTest
org.bouncycastle.jce.provider.test.PBETest
- All Implemented Interfaces:
- Test
public class PBETest
- extends SimpleTest
test out the various PBE modes, making sure the JCE implementations
are compatible woth the light weight ones.
Method Summary |
private boolean |
arrayEquals(byte[] a,
byte[] b)
|
java.lang.String |
getName()
|
static void |
main(java.lang.String[] args)
|
private javax.crypto.Cipher |
makePBECipherUsingParam(java.lang.String algorithm,
int mode,
char[] password,
byte[] salt,
int iterationCount)
|
private javax.crypto.Cipher |
makePBECipherWithoutParam(java.lang.String algorithm,
int mode,
char[] password,
byte[] salt,
int iterationCount)
|
void |
performTest()
|
void |
testPBEHMac(java.lang.String hmacName,
byte[] output)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pkcs12Tests
private PBETest.PKCS12Test[] pkcs12Tests
openSSLTests
private PBETest.OpenSSLTest[] openSSLTests
message
static byte[] message
hMac1
private byte[] hMac1
hMac2
private byte[] hMac2
PBETest
public PBETest()
makePBECipherUsingParam
private javax.crypto.Cipher makePBECipherUsingParam(java.lang.String algorithm,
int mode,
char[] password,
byte[] salt,
int iterationCount)
throws java.lang.Exception
- Throws:
java.lang.Exception
makePBECipherWithoutParam
private javax.crypto.Cipher makePBECipherWithoutParam(java.lang.String algorithm,
int mode,
char[] password,
byte[] salt,
int iterationCount)
throws java.lang.Exception
- Throws:
java.lang.Exception
arrayEquals
private boolean arrayEquals(byte[] a,
byte[] b)
testPBEHMac
public void testPBEHMac(java.lang.String hmacName,
byte[] output)
performTest
public void performTest()
throws java.lang.Exception
- Specified by:
performTest
in class SimpleTest
- Throws:
java.lang.Exception
getName
public java.lang.String getName()
- Specified by:
getName
in interface Test
- Specified by:
getName
in class SimpleTest
main
public static void main(java.lang.String[] args)