gov.lanl.MakeTestKeys
Class MakeIButtonKeys
java.lang.Object
|
+--gov.lanl.MakeTestKeys.MakeIButtonKeys
- public class MakeIButtonKeys
- extends java.lang.Object
This class makes a public key, writes a certificate with the
pub keys to a floppy disk
as well as a encrypted (with the private key) string. The keys are
written with the user name for the file name and .prv or .pub extensions
-

|
Method Summary |
iaik.x509.X509Certificate |
createCertificate(iaik.asn1.structures.Name subject,
java.security.PublicKey pk,
iaik.asn1.structures.Name issuer,
iaik.asn1.structures.AlgorithmID algorithm,
boolean extensions)
|
void |
createDirAndWriteData()
Creates a directory named loginName and write the data.txt file |
void |
encryptAndWrite(java.io.File thefile,
char[] sampleChar,
int flag,
int blksize)
|
void |
generateRSAKeyDisk()
|
iaik.security.rsa.RSAPublicKey |
getPublicKey()
|
static void |
main(java.lang.String[] arg)
Performs certificate creation and verification tests. |
void |
writeEncryptedRSASamples(iaik.security.rsa.RSAPublicKey pubk)
|
void |
writeX509Certificate(iaik.security.rsa.RSAPublicKey pubk)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MakeIButtonKeys
public MakeIButtonKeys()
getPublicKey
public iaik.security.rsa.RSAPublicKey getPublicKey()
createCertificate
public iaik.x509.X509Certificate createCertificate(iaik.asn1.structures.Name subject,
java.security.PublicKey pk,
iaik.asn1.structures.Name issuer,
iaik.asn1.structures.AlgorithmID algorithm,
boolean extensions)
writeX509Certificate
public void writeX509Certificate(iaik.security.rsa.RSAPublicKey pubk)
encryptAndWrite
public void encryptAndWrite(java.io.File thefile,
char[] sampleChar,
int flag,
int blksize)
writeEncryptedRSASamples
public void writeEncryptedRSASamples(iaik.security.rsa.RSAPublicKey pubk)
generateRSAKeyDisk
public void generateRSAKeyDisk()
createDirAndWriteData
public void createDirAndWriteData()
- Creates a directory named loginName and write the data.txt file
main
public static void main(java.lang.String[] arg)
throws java.io.IOException
- Performs certificate creation and verification tests.
- Throws:
java.io.IOException - if an I/O Error occurs