public class RadixIdentities
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static LocalRadixIdentity |
createNew()
Creates a new radix identity which is not stored anywhere
|
static RadixIdentity |
createNewEncryptedIdentity(java.io.Writer writer,
java.lang.String password)
Creates a new private key and encrypts it and then writes/flushes the result to a given writer
|
static RadixIdentity |
fromPrivateKeyBase64(java.lang.String privateKeyBase64)
Creates a radix identity from a private key
|
static RadixIdentity |
loadOrCreateEncryptedFile(java.io.File keyFile,
java.lang.String password)
Loads or creates an encrypted file containing a private key and returns
the associated radix identity
|
static RadixIdentity |
loadOrCreateEncryptedFile(java.lang.String filePath,
java.lang.String password)
Loads or creates an encrypted file containing a private key and returns
the associated radix identity
|
static RadixIdentity |
loadOrCreateFile(java.io.File keyFile)
Loads or creates an unencrypted file containing a private key and returns
the associated radix identity
|
static RadixIdentity |
loadOrCreateFile(java.lang.String filePath)
Loads or creates an unencrypted file containing a private key and returns
the associated radix identity
|
static RadixIdentity |
readEncryptedIdentity(java.io.Reader reader,
java.lang.String password)
Reads an encrypted private key from a given reader and decrypts it with a given password
|
public static RadixIdentity fromPrivateKeyBase64(java.lang.String privateKeyBase64)
privateKeyBase64
- the private key encoded in base 64public static LocalRadixIdentity createNew()
public static RadixIdentity loadOrCreateFile(java.io.File keyFile) throws java.io.IOException
keyFile
- the file to load or createjava.io.IOException
public static RadixIdentity loadOrCreateFile(java.lang.String filePath) throws java.io.IOException
filePath
- the path of the file to load or createjava.io.IOException
public static RadixIdentity loadOrCreateEncryptedFile(java.io.File keyFile, java.lang.String password) throws java.io.IOException, java.security.GeneralSecurityException
keyFile
- the file to load or createpassword
- the password to decrypt the encrypted filejava.io.IOException
java.security.GeneralSecurityException
public static RadixIdentity loadOrCreateEncryptedFile(java.lang.String filePath, java.lang.String password) throws java.io.IOException, java.security.GeneralSecurityException
filePath
- the path of the file to load or createpassword
- the password to decrypt the encrypted filejava.io.IOException
java.security.GeneralSecurityException
public static RadixIdentity createNewEncryptedIdentity(java.io.Writer writer, java.lang.String password) throws java.io.IOException, java.security.GeneralSecurityException
writer
- the writer to write the encrypted private key topassword
- the password to encrypt the private key withjava.io.IOException
java.security.GeneralSecurityException
public static RadixIdentity readEncryptedIdentity(java.io.Reader reader, java.lang.String password) throws java.io.IOException, java.security.GeneralSecurityException
reader
- the reader to read the encrypted private key frompassword
- the password to decrypt the private key withjava.io.IOException
java.security.GeneralSecurityException