• Articles
  • Api Documentation
Search Results for

    Show / Hide Table of Contents
    • SipLib.Body
      • BodyParser
      • ContentTypes
      • MessageContentsContainer
      • MultipartBinaryBodyBuilder
      • SipBodyBuilder
    • SipLib.Channels
      • AcceptCertificateDelegate
      • AcceptConnectionDelegate
      • DscpSettings
      • LogInvalidSipMessageDelegate
      • LogSipRequestDelegate
      • LogSipResponseDelegate
      • Qos
      • SIPChannel
      • SIPConnection
      • SIPConnectionDisconnectedDelegate
      • SIPConnectionsEnum
      • SIPMessageReceivedDelegate
      • SIPTCPChannel
      • SIPTLSChannel
      • SIPUDPChannel
      • SipConnectionFailedDelegate
      • SipRequestReceivedDelegate
      • SipResponseReceivedDelegate
      • SipTransactionCompleteDelegate
      • WindowsQos
    • SipLib.Collections
      • ThreadSafeGenericList<T>
    • SipLib.Core
      • ByteBufferInfo
      • CallProperties
      • Crypto
      • HTTPDigest
      • IPSocket
      • SIPAuthenticationHeader
      • SIPAuthorisationDigest
      • SIPAuthorisationHeadersEnum
      • SIPCallInfoHeader
      • SIPConstants
      • SIPContactHeader
      • SIPEndPoint
      • SIPEscape
      • SIPFrag
      • SIPFromHeader
      • SIPGeolocationHeader
      • SIPHeader
      • SIPHeaders
      • SIPMessage
      • SIPMessageTypesEnum
      • SIPMethods
      • SIPMethodsEnum
      • SIPPaiHeader
      • SIPParameters
      • SIPPpiHeader
      • SIPProtocolsEnum
      • SIPProtocolsType
      • SIPReplacesParameter
      • SIPRequest
      • SIPResponse
      • SIPResponseStatusCodes
      • SIPResponseStatusCodesEnum
      • SIPRoute
      • SIPRouteSet
      • SIPSchemesEnum
      • SIPSchemesType
      • SIPToHeader
      • SIPURI
      • SIPUserField
      • SIPValidationException
      • SIPValidationFieldsEnum
      • SIPViaHeader
      • SIPViaSet
      • SipUtils
      • TypeExtensions
    • SipLib.Dtls
      • AlertLevelsEnum
      • AlertTypesEnum
      • DtlsClientUdpTransport
      • DtlsServerUdpTransport
      • DtlsSrtpClient
      • DtlsSrtpServer
      • DtlsSrtpTransport
      • DtlsUtils
      • IDtlsSrtpPeer
      • IPacketTransformer
      • ITransformEngine
      • NetConvert
      • RTCDtlsFingerprint
      • RawPacket
      • SrtcpCryptoContext
      • SrtpPolicy
      • SrtpTransformEngine
      • SrtpTransformer
    • SipLib.Logging
      • SipLogger
    • SipLib.Media
      • ALawDecoder
      • ALawEncoder
      • AudioDestination
      • AudioDestinationDelegate
      • AudioSampleData
      • AudioSamplesReadyDelegate
      • AudioSource
      • Band
      • DtmfDigitReceivedDelegate
      • FileAudioSource
      • G722Codec
      • G722CodecState
      • G722Decoder
      • G722Encoder
      • G722Flags
      • HighResolutionTimer
      • HighResolutionTimerDelegate
      • IAudioDecoder
      • IAudioEncoder
      • IAudioSampleSource
      • MediaPortManager
      • MediaPortSettings
      • MediaTypes
      • MsrpEncryptionEnum
      • MuLawDecoder
      • MuLawEncoder
      • PcmaDecoder
      • PcmaEncoder
      • PcmuDecoder
      • PcmuEncoder
      • PortRange
      • RtpEncryptionEnum
    • SipLib.Msrp
      • ByteRangeHeader
      • CpimMessage
      • MsrpCompletionStatus
      • MsrpConnection
      • MsrpConnectionStatusDelegate
      • MsrpMessage
      • MsrpMessageDeliveryFailedDelegate
      • MsrpMessageReceivedDelegate
      • MsrpMessageSentDelegate
      • MsrpMessageType
      • MsrpPathHeader
      • MsrpStatusHeader
      • MsrpStreamParser
      • MsrpTextMessageReceivedDelegate
      • MsrpUri
      • ReportReceivedDelegate
    • SipLib.Network
      • IpUtils
    • SipLib.RealTimeText
      • RttCharactersReceivedDelegate
      • RttParameters
      • RttReceiver
      • RttRtpSendDelegate
      • RttSender
    • SipLib.Rtp
      • ByePacket
      • DtlsHandshakeFailedDelegate
      • DtmfEventEnum
      • DtmfPacket
      • JitterStatistics
      • MeanOpinionScore
      • ReceiveStatisticsReadyDelegate
      • ReceiverReport
      • ReportBlock
      • RtcpCompoundPacket
      • RtcpHeader
      • RtcpPacketReceivedDelegate
      • RtcpPacketSentDelegate
      • RtcpPacketType
      • RtpChannel
      • RtpPacket
      • RtpPacketReceivedDelegate
      • RtpPacketSentDelegate
      • RtpReceiveStatistics
      • RtpUtils
      • SdesChunk
      • SdesItem
      • SdesItemType
      • SdesPacket
      • SenderInfo
      • SenderReport
    • SipLib.RtpCrypto
      • AesFunctions
      • CryptoAttribute
      • CryptoContext
      • CryptoSuites
      • InlineParams
      • MasterKeys
      • RocVals
      • RocValues
      • SRtpErrorsEnum
      • SRtpUtils
      • SessionKeys
      • SrtpDecryptor
      • SrtpEncryptor
      • SrtpLabelItem
      • SrtpTransformBase
    • SipLib.Sdp
      • ConnectionData
      • MediaDescription
      • MediaDirectionEnum
      • Origin
      • RtpMapAttribute
      • Sdp
      • SdpAnswerSettings
      • SdpAttribute
      • SdpUtils
      • SetupType
    • SipLib.Threading
      • QueuedActionWorkerTask
    • SipLib.Transactions
      • ClientInviteTransaction
      • ClientNonInviteTransaction
      • ServerInviteTransaction
      • ServerNonInviteTransaction
      • SipTimers
      • SipTransactionBase
      • SipTransport
      • TransactionRequestReceivedDelegate
      • TransactionResponseReceivedDelegate
      • TransactionStateEnum
      • TransactionTerminationReasonEnum
    • SipLib.Video
      • H264Depacketiser
      • H264Packetiser
      • H264Packetiser.H264Nal
      • H264RtpReceiver
      • H264RtpSender
      • RtpSendDelegate
      • RtpVP8Header
      • VP8RtpReceiver
      • VP8RtpSender
      • VideoRtpReceiver
      • VideoRtpSender

    Class Crypto

    Class containing various cryptography utilities

    Inheritance
    object
    Crypto
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SipLib.Core
    Assembly: SipLib.dll
    Syntax
    public class Crypto

    Methods

    | Edit this page View Source

    GetRandomByteArray(byte[], int, int)

    Fills an array of bytes with random numbers.

    Declaration
    public static void GetRandomByteArray(byte[] buffer, int offset, int length)
    Parameters
    Type Name Description
    byte[] buffer

    Destination

    int offset

    Starting index in the destination buffer

    int length

    Number of bytes to write

    | Edit this page View Source

    GetRandomByteString(int)

    Gets an "X2" string representation of a random number.

    Declaration
    public static string GetRandomByteString(int byteLength)
    Parameters
    Type Name Description
    int byteLength

    The byte length of the random number string to obtain.

    Returns
    Type Description
    string

    A string representation of the random number. It will be twice the length of byteLength.

    | Edit this page View Source

    GetRandomInt()

    Returns a 10 digit random number.

    Declaration
    public static int GetRandomInt()
    Returns
    Type Description
    int
    | Edit this page View Source

    GetRandomInt(int)

    Returns a random number of a specified length.

    Declaration
    public static int GetRandomInt(int length)
    Parameters
    Type Name Description
    int length
    Returns
    Type Description
    int
    | Edit this page View Source

    GetRandomInt(int, int)

    Generates a 32-bit random number between a minimum and a maximum value.

    Declaration
    public static int GetRandomInt(int minValue, int maxValue)
    Parameters
    Type Name Description
    int minValue
    int maxValue
    Returns
    Type Description
    int
    | Edit this page View Source

    GetRandomString()

    Creates a random string of characters. The length is DEFAULT_RANDOM_LENGTH

    Declaration
    public static string GetRandomString()
    Returns
    Type Description
    string

    The random string

    | Edit this page View Source

    GetRandomString(int)

    Creates a string of random characters

    Declaration
    public static string GetRandomString(int length)
    Parameters
    Type Name Description
    int length

    Desired length of the string

    Returns
    Type Description
    string

    Random string of random alphabet characters

    | Edit this page View Source

    GetRandomUInt()

    Gets a unsigned 32 bit random number

    Declaration
    public static uint GetRandomUInt()
    Returns
    Type Description
    uint
    | Edit this page View Source

    GetRandomUInt16()

    Gets a 16 bit unsigned random number

    Declaration
    public static ushort GetRandomUInt16()
    Returns
    Type Description
    ushort
    | Edit this page View Source

    GetSHAHash(params string[])

    Gets the SHA1 hash of an array of string values

    Declaration
    public static byte[] GetSHAHash(params string[] values)
    Parameters
    Type Name Description
    string[] values
    Returns
    Type Description
    byte[]
    | Edit this page View Source

    GetSHAHashAsHex(params string[])

    Returns the hash with each byte as an X2 string. This is useful for situations where the hash needs to only contain safe ASCII characters.

    Declaration
    public static string GetSHAHashAsHex(params string[] values)
    Parameters
    Type Name Description
    string[] values

    The list of string to concantenate and hash.

    Returns
    Type Description
    string

    A string with "safe" (0-9 and A-F) characters representing the hash.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX