silc_ssh_public_key_decode

SYNOPSIS

    int silc_ssh_public_key_decode(unsigned char *key, SilcUInt32 key_len,
                                   SilcSshPublicKey *ret_public_key);

DESCRIPTION

Decodes SSH Public Key indicated by `key' of length of `key_len' bytes. The decoded public key is returned into the `ret_public_key' which the caller must free by calling the silc_ssh_public_key_free function. This function expects the public key to be in raw binary format, without any public key file markers or headers.

This decodes SSH2 protocol compliant raw public key.

This function returns the number of bytes decoded from the public key buffer or 0 on error.