|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.jss.tests.JCAKeyWrap
public class JCAKeyWrap
Test Mozilla-JSS provider key wrap/unwrap JSS currently needs to compile with JDK 1.4.2.x This program tests wrapping/unwrapping on symmetric keys. unwraping of private keys is not available at this time see https://bugzilla.mozilla.org/show_bug.cgi?id=135328
Field Summary | |
---|---|
protected boolean |
bFipsMode
|
protected static java.lang.String |
MOZ_PROVIDER_NAME
|
protected byte[] |
plainText
|
protected byte[] |
plainTextPad
|
Constructor Summary | |
---|---|
JCAKeyWrap(java.lang.String certDbLoc,
java.lang.String passwdFile)
Default constructor to initialize Mozilla-JSS |
Method Summary | |
---|---|
boolean |
isBFipsMode()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
testCipher(java.lang.String symKeyType)
Randomly selects a cipher transformation "algorithm/mode/padding". |
protected void |
testKeys(java.security.Key keyA,
java.security.Key keyB,
java.lang.String providerA,
java.lang.String providerB)
|
static void |
usage()
|
void |
wrapSymetricKey(java.security.Key symKey,
java.lang.String wrapperAlg,
java.security.Key wrapperKey)
both providers used will be Mozilla-JSS |
void |
wrapSymetricKey(java.security.Key symKey,
java.lang.String wrapperAlg,
java.security.Key wrapperKey,
java.lang.String providerA,
java.lang.String providerB)
|
void |
wrapSymetricKeyWithRSA(java.security.Key symKey,
java.security.KeyPair keyPair)
both providers are Mozilla-JSS |
void |
wrapSymetricKeyWithRSA(java.security.Key symKey,
java.security.KeyPair keyPair,
java.lang.String providerA,
java.lang.String providerB)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String MOZ_PROVIDER_NAME
protected boolean bFipsMode
protected byte[] plainText
protected byte[] plainTextPad
Constructor Detail |
---|
public JCAKeyWrap(java.lang.String certDbLoc, java.lang.String passwdFile)
certDbLoc
- passwdFile
- Method Detail |
---|
public static void main(java.lang.String[] args)
public static void usage()
public boolean isBFipsMode()
public java.lang.String testCipher(java.lang.String symKeyType) throws java.lang.Exception
symKeyType
-
java.lang.Exception
public void wrapSymetricKeyWithRSA(java.security.Key symKey, java.security.KeyPair keyPair) throws java.lang.Exception
symKey
- keyPair
-
java.lang.Exception
public void wrapSymetricKeyWithRSA(java.security.Key symKey, java.security.KeyPair keyPair, java.lang.String providerA, java.lang.String providerB) throws java.lang.Exception
symKey
- keyPair
- providerA
- providerB
-
java.lang.Exception
public void wrapSymetricKey(java.security.Key symKey, java.lang.String wrapperAlg, java.security.Key wrapperKey) throws java.lang.Exception
symKey
- wrapperAlg
- wrapperKey
-
java.lang.Exception
protected void testKeys(java.security.Key keyA, java.security.Key keyB, java.lang.String providerA, java.lang.String providerB) throws java.lang.Exception
keyA
- keyB
- providerA
- providerB
-
java.lang.Exception
public void wrapSymetricKey(java.security.Key symKey, java.lang.String wrapperAlg, java.security.Key wrapperKey, java.lang.String providerA, java.lang.String providerB) throws java.lang.Exception
symKey
- wrapperAlg
- wrapperKey
- providerA
- providerB
-
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |