Method: SSHData::Encoding#decode_signature
- Defined in:
- lib/ssh_data/encoding.rb
#decode_signature(raw, offset = 0) ⇒ Object
Decode the signature.
raw - The binary String signature as described by RFC4253 section 6.6. offset - Integer number of bytes into raw at which we should start
reading.
Returns an Array containing the decoded algorithm String, the decoded binary signature String, and the Integer number of bytes read.
257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/ssh_data/encoding.rb', line 257 def decode_signature(raw, offset=0) total_read = 0 algo, read = decode_string(raw, offset + total_read) total_read += read sig, read = decode_string(raw, offset + total_read) total_read += read [algo, sig, total_read] end |