Method: OmfCommon::Auth::SSHPubKeyConvert.unpack_u32
- Defined in:
- lib/omf_common/auth/ssh_pub_key_convert.rb
.unpack_u32(bytes) ⇒ Object
Unpack a 4-byte unsigned integer from the bytes array.
Returns a pair (u32, bytes), where u32 is the extracted unsigned integer, and bytes is the remainder of the original bytes array that follows u32.
22 23 24 |
# File 'lib/omf_common/auth/ssh_pub_key_convert.rb', line 22 def self.unpack_u32(bytes) return bytes.unpack("N")[0], bytes[4..-1] end |