pub fn validate_fixed_key_length(key: &PSBTKey, length: usize) -> Result<(), PSBTError> {
    if key.len() != length {
        Err(PSBTError::WrongKeyLength {
            expected: length,
            got: key.len(),
        })
    } else {
        Ok(())
    }
}
/// Validate that a key is a fixed length
Validate that a key is a fixed length
Validate that a key is a fixed length
pub fn validate_fixed_key_length(key: &PSBTKey, length: usize) -> Result<(), PSBTError> {
    if key.len() != length {
        Err(PSBTError::WrongKeyLength {
            expected: length,
            got: key.len(),
        })
    } else {
        Ok(())
    }
}
pub fn validate_fixed_key_length ( key : & PSBTKey , length : usize ) -> Result < ( ) , PSBTError > { if key . len ( ) != length { Err ( PSBTError :: WrongKeyLength { expected : length , got : key . len ( ) , } ) } else { Ok ( ( ) ) } }
Validate that a key is a fixed length
Validate that a key is a fixed length
key
&PSBTKey
length
usize
key
&PSBTKey
length
usize