from

fun from(data: ByteArray, decrypt: (ByteArray, Int) -> ByteArray? = null): Secret

Deserialize any secret type and create the correct derived class The decrypt function will not actually be used at this point. Its there to be called by a user of a SecuredSecret when the secret is needed. Therefore you can call this function when the wallet is locked.