pod.epiccastle.bbssh.identity

Creates and calls the various methods of an Identity that exists on the pod heap.

new

(new callbacks)

Create a new identity. Pass in a hashmap containing the functions to execute as values. These functions will be called by the internal ssh engine. The hashmap should contain some subset of the following keywords:

:set-passphrase (fn [^bytes passphrase] ...)

Called when the system wants to try to decrypt this identity with the passed in passphrase.

:get-public-key-blob (fn [] ...)

Return a byte-array of the identity’s public key.

:get-signature (fn ([^bytes data] ...)
                   ([^bytes data ^String algorithm))

Sign the incoming data (with algorithm) and return a byte-array of the signature

:get-alg-name (fn [] ...)

Return a string containing the identity’s algorithm name. for example “ssh-rsa” or “ssh-dss”

:get-name (fn [] ...)

Return a string name for this identity

:is-encrypted (fn [] ...)

Return a truthy value if this identity is encrypted

:clear (fn [] ...)

Erase all the memory associated with this identity as the system has finished using it.