- Index
- »
- fan.crypto
- »
- KeyStore
KeyStore
const mixin KeyStore
KeyStore stores keys[`Key`] and certificates[`Cert`] in an aliased keystore entry. Aliases are case-insensitive.
Adds a PrivKeyEntry to the keystore with the given alias and returns it
Get all the aliases in the key store
Set an alias to have the given entry
Convenience to get a PrivKeyEntry from the keystore
Get the number of entries in the key store
Adds a TrustEntry to the keystore with the given alias and returns it
Get the entry with the given alias
Convenience to get a TrustEntry from the keystore
Return ture if the key store has an entry with the given alias
Get the format that this keystore stores entries in
Save the entries in the keystore to the output stream
Remove the entry with the given alias
abstract Str[] aliases()
Get all the aliases in the key store.
virtual Bool containsAlias(Str alias)
Return ture if the key store has an entry with the given alias.
abstract Str format()
Get the format that this keystore stores entries in.
abstract KeyStoreEntry? get(Str alias, Bool checked)
Get the entry with the given alias.
virtual PrivKeyEntry? getPrivKey(Str alias, Bool checked)
Convenience to get a PrivKeyEntry from the keystore.
virtual TrustEntry? getTrust(Str alias, Bool checked)
Convenience to get a TrustEntry from the keystore.
abstract Void remove(Str alias)
Remove the entry with the given alias.
Throws Err if the key store is not writable.
abstract Void save(OutStream out, Str:Obj options)
Save the entries in the keystore to the output stream.
abstract This set(Str alias, KeyStoreEntry entry)
Set an alias to have the given entry. If the alias already exists, it is overwritten.
Throws Err if the key store is not writable.
Throws Err if the key store doesn't support writing the entry type.
abstract This setPrivKey(Str alias, PrivKey priv, Cert[] chain)
Adds a PrivKeyEntry to the keystore with the given alias and returns it.
abstract This setTrust(Str alias, Cert cert)
Adds a TrustEntry to the keystore with the given alias and returns it.
abstract Int size()
Get the number of entries in the key store.