Class MavlinkVerifier
A signing key and the timestamps it has already accepted.
public sealed class MavlinkVerifier : IDisposable
- Inheritance
-
MavlinkVerifier
- Implements
- Inherited Members
Constructors
MavlinkVerifier(ReadOnlySpan<byte>)
Creates a verifier.
public MavlinkVerifier(ReadOnlySpan<byte> key)
Parameters
keyReadOnlySpan<byte>The shared signing key, KeyLength bytes.
Exceptions
- ArgumentException
The key is the wrong length.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
SetWindow(ulong)
Sets how far a timestamp may run ahead of the last one accepted.
public void SetWindow(ulong window)
Parameters
windowulongThe window in timestamp units, ten microseconds each.
Remarks
A wider window tolerates a noisier link; a narrower one narrows the chance of a replay landing inside it.
Verify(MavlinkFrame)
Checks a frame's signature and its place in the timestamp sequence.
public void Verify(MavlinkFrame frame)
Parameters
frameMavlinkFrameThe frame to check.
Exceptions
- PamojaException
The frame is unsigned, the signature does not match the key, or the timestamp has been seen before.