pub(crate) fn select_signature_scheme(
    sigs: &[SignatureHashAlgorithm],
    private_key: &CryptoPrivateKey,
) -> Result<SignatureHashAlgorithm, Error> {
    for ss in sigs {
        if ss.is_compatible(private_key) {
            return Ok(*ss);
        }
    }

    Err(ERR_NO_AVAILABLE_SIGNATURE_SCHEMES.clone())
}
// select Signature Scheme returns most preferred and compatible scheme.
select Signature Scheme returns most preferred and compatible scheme.
select Signature Scheme returns most preferred and compatible scheme .
pub(crate) fn select_signature_scheme(
    sigs: &[SignatureHashAlgorithm],
    private_key: &CryptoPrivateKey,
) -> Result<SignatureHashAlgorithm, Error> {
    for ss in sigs {
        if ss.is_compatible(private_key) {
            return Ok(*ss);
        }
    }
    Err(ERR_NO_AVAILABLE_SIGNATURE_SCHEMES.clone())
}
pub ( crate ) fn select_signature_scheme ( sigs : & [ SignatureHashAlgorithm ] , private_key : & CryptoPrivateKey , ) -> Result < SignatureHashAlgorithm , Error > { for ss in sigs { if ss . is_compatible ( private_key ) { return Ok ( * ss ) ; } } Err ( ERR_NO_AVAILABLE_SIGNATURE_SCHEMES . clone ( ) ) }
select Signature Scheme returns most preferred and compatible scheme.
select Signature Scheme returns most preferred and compatible scheme .
sigs
&[SignatureHashAlgorithm]
private_key
&CryptoPrivateKey
sigs
&[SignatureHashAlgorithm]
private_key
&CryptoPrivateKey