public class Keyring
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
KEY_LEN |
(package private) static long |
KEY_LIFETIME |
private java.util.Vector |
m_expiring |
private java.util.Vector |
m_mykeys |
private java.lang.String |
m_password |
private int |
m_today |
Constructor and Description |
---|
Keyring(java.lang.String password)
Constructor
|
Modifier and Type | Method and Description |
---|---|
private int |
byteToInt(byte[] b,
int offset)
Calculates the int value of a given ByteArray
|
void |
changeKeyringPW(java.lang.String newpw) |
byte[] |
getNewSecret() |
java.util.Vector |
getUserSecrets() |
private byte[] |
makeNewKey()
Produces a new usersecret
|
private int |
myceil(double a,
double b)
Behaves like Math.ceil, but gives minimum 1 as value
|
private java.lang.String |
packKeyring()
encrypts the m_data and brings it in a
ascii-armored base64 notation
|
private void |
saveKeyRing()
saves the keyring
|
private void |
unpackKeyRing(java.lang.String encodeddata) |
final int KEY_LEN
static final long KEY_LIFETIME
private java.util.Vector m_mykeys
private java.util.Vector m_expiring
private java.lang.String m_password
private int m_today
public Keyring(java.lang.String password)
password
- public java.util.Vector getUserSecrets()
public byte[] getNewSecret()
private java.lang.String packKeyring()
private void unpackKeyRing(java.lang.String encodeddata) throws java.io.IOException
java.io.IOException
private byte[] makeNewKey()
public void changeKeyringPW(java.lang.String newpw)
private void saveKeyRing()
private int byteToInt(byte[] b, int offset)
b
- offset
- private int myceil(double a, double b)
a
- b
- Copyright © 2023. All rights reserved.