com.jscape.inet.ssh.protocol.v2.marshaling.algorithms

## Class JceMacFactory

- java.lang.Object
- - com.jscape.inet.ssh.protocol.v2.marshaling.algorithms.JceMacFactory

- All Implemented Interfaces:
    MacFactory

      public class JceMacFactory
      extends java.lang.Object
      implements MacFactory

  JCE-based MAC algorithm factory.
  Author:
    Alex Usun

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `JceMacFactory.Entry` An algorithm entry.

    - ### Nested classes/interfaces inherited from interface com.jscape.inet.ssh.protocol.v2.marshaling.algorithms.MacFactory

      `MacFactory.OperationException`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JceMacFactory(JceMacFactory.Entry... entries)` Creates a new factory instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Mac` | `clientToServerMacFor(java.lang.String name, KeyFactory keyFactory)` Returns a MAC operation for client-server direction.
    `java.util.List<java.lang.String>` | `macs()` Returns supported MAC algorithms.
    `Mac` | `serverToClientMacFor(java.lang.String name, KeyFactory keyFactory)` Returns a MAC operation for server-client direction.
    `JceMacFactory` | `set(JceMacFactory.Entry... entries)` Sets algorithm entries.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### JceMacFactory

          public JceMacFactory(JceMacFactory.Entry... entries)

      Creates a new factory instance.
      Parameters:
        `entries` - entries

  - ### Method Detail

    - #### set

          public JceMacFactory set(JceMacFactory.Entry... entries)

      Sets algorithm entries.
      Parameters:
        `entries` - entries
      Returns:
        current factory instance

    - #### macs

          public java.util.List<java.lang.String> macs()

      Description copied from interface: `MacFactory`
      Returns supported MAC algorithms.
      Specified by:
        `macs` in interface `MacFactory`
      Returns:
        supported MAC algorithms

    - #### clientToServerMacFor

          public Mac clientToServerMacFor(java.lang.String name,
                                          KeyFactory keyFactory)
                                   throws MacFactory.OperationException

      Description copied from interface: `MacFactory`
      Returns a MAC operation for client-server direction.
      Specified by:
        `clientToServerMacFor` in interface `MacFactory`
      Parameters:
        `name` - a SSH algorithm name
        `keyFactory` - a key factory
      Returns:
        a MAC operation
      Throws:
        `MacFactory.OperationException` - if an error occurs

    - #### serverToClientMacFor

          public Mac serverToClientMacFor(java.lang.String name,
                                          KeyFactory keyFactory)
                                   throws MacFactory.OperationException

      Description copied from interface: `MacFactory`
      Returns a MAC operation for server-client direction.
      Specified by:
        `serverToClientMacFor` in interface `MacFactory`
      Parameters:
        `name` - a SSH algorithm name
        `keyFactory` - a key factory
      Returns:
        a MAC operation
      Throws:
        `MacFactory.OperationException` - if an error occurs

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved