Show / Hide Table of Contents

    Class SecurityUtility

    This utility class is designed to make security operations easier to work with.

    Inheritance
    System.Object
    SecurityUtility
    Namespace: Cuemon.Security
    Assembly: Cuemon.Security.dll
    Syntax
    public static class SecurityUtility

    Methods

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityToken, Byte[], Byte[])

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[]) method.

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityToken token, byte[] securityKey, byte[] securityInitializationVector)
    Parameters
    Type Name Description
    SecurityToken token

    The SecurityToken to convert and encrypt to a byte[] representation.

    System.Byte[] securityKey

    The key to use in the encryption algorithm.

    System.Byte[] securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the format of the ToString() method.

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityToken, String, String)

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[])

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityToken token, string securityKey, string securityInitializationVector)
    Parameters
    Type Name Description
    SecurityToken token

    The SecurityToken to convert and encrypt to a byte[] representation.

    System.String securityKey

    The key to use in the encryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the format of the ToString() method.

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityToken, String, String, Encoding)

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[])

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityToken token, string securityKey, string securityInitializationVector, Encoding encoding)
    Parameters
    Type Name Description
    SecurityToken token

    The SecurityToken to convert and encrypt to a byte[] representation.

    System.String securityKey

    The key to use in the encryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    System.Text.Encoding encoding

    The encoding used for the securityKey and securityInitializationVector. Default is System.Text.Encoding.UTF8.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the following XML format of the ToString() method.

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityTokenSettings, Byte[], Byte[])

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[]) method.

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityTokenSettings settings, byte[] securityKey, byte[] securityInitializationVector)
    Parameters
    Type Name Description
    SecurityTokenSettings settings

    The to apply to SecurityToken instance.

    System.Byte[] securityKey

    The key to use in the encryption algorithm.

    System.Byte[] securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the format of the ToString() method.

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityTokenSettings, String, String)

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[])

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityTokenSettings settings, string securityKey, string securityInitializationVector)
    Parameters
    Type Name Description
    SecurityTokenSettings settings

    The to apply to SecurityToken instance.

    System.String securityKey

    The key to use in the encryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the format of the ToString() method.

    | Improve this Doc

    CreateEncryptedSecurityToken(SecurityTokenSettings, String, String, Encoding)

    Creates a security token easily adopted into various services in the format of the ToString() method. The token itself is encrypted using the Encrypt(Byte[], Byte[], Byte[])

    Declaration
    public static byte[] CreateEncryptedSecurityToken(SecurityTokenSettings settings, string securityKey, string securityInitializationVector, Encoding encoding)
    Parameters
    Type Name Description
    SecurityTokenSettings settings

    The to apply to SecurityToken instance.

    System.String securityKey

    The key to use in the encryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the encryption algorithm.

    System.Text.Encoding encoding

    The encoding used for the securityKey and securityInitializationVector. Default is System.Text.Encoding.UTF8.

    Returns
    Type Description
    System.Byte[]

    A security token easily adopted into various services in the following XML format of the ToString() method.

    | Improve this Doc

    ParseEncryptedSecurityToken(Byte[], Byte[], Byte[])

    Creates a SecurityToken instance from the parsed encrypted securityToken. The token itself is decrypted using the Decrypt(Byte[], Byte[], Byte[]) method.

    Declaration
    public static SecurityToken ParseEncryptedSecurityToken(byte[] securityToken, byte[] securityKey, byte[] securityInitializationVector)
    Parameters
    Type Name Description
    System.Byte[] securityToken

    The security token to parse.

    System.Byte[] securityKey

    The key to use in the decryption algorithm.

    System.Byte[] securityInitializationVector

    The initialization vector (IV) to use in the decryption algorithm.

    Returns
    Type Description
    SecurityToken

    An instance of the SecurityToken object.

    | Improve this Doc

    ParseEncryptedSecurityToken(Byte[], String, String)

    Creates a SecurityToken instance from the parsed encrypted securityToken. The token itself is decrypted using the Decrypt(Byte[], Byte[], Byte[]) method.

    Declaration
    public static SecurityToken ParseEncryptedSecurityToken(byte[] securityToken, string securityKey, string securityInitializationVector)
    Parameters
    Type Name Description
    System.Byte[] securityToken

    The security token to parse.

    System.String securityKey

    The key to use in the decryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the decryption algorithm.

    Returns
    Type Description
    SecurityToken

    An instance of the SecurityToken object.

    | Improve this Doc

    ParseEncryptedSecurityToken(Byte[], String, String, Encoding)

    Creates a SecurityToken instance from the parsed encrypted securityToken. The token itself is decrypted using the Decrypt(Byte[], Byte[], Byte[]) method.

    Declaration
    public static SecurityToken ParseEncryptedSecurityToken(byte[] securityToken, string securityKey, string securityInitializationVector, Encoding encoding)
    Parameters
    Type Name Description
    System.Byte[] securityToken

    The security token to parse.

    System.String securityKey

    The key to use in the decryption algorithm.

    System.String securityInitializationVector

    The initialization vector (IV) to use in the decryption algorithm.

    System.Text.Encoding encoding

    The encoding used for the securityKey and securityInitializationVector. Default is System.Text.Encoding.UTF8.

    Returns
    Type Description
    SecurityToken

    An instance of the SecurityToken object.

    • Improve this Doc
    • View Source
    Back to top Copyright 2008-2018 Weubphoria. All rights reserved.
    Generated by DocFX