org.apache.ignite.spi.discovery.tcp.ipfinder.s3.encrypt

## Class SymmetricKeyEncryptionService

- java.lang.Object
- - org.apache.ignite.spi.discovery.tcp.ipfinder.s3.encrypt.SymmetricKeyEncryptionService

- All Implemented Interfaces:
    EncryptionService

      public class SymmetricKeyEncryptionService
      extends Object
      implements EncryptionService

  Service to encrypt data using symmetric key encryption.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SymmetricKeyEncryptionService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `decrypt(byte[] data)` Decrypt the input data.
    `byte[]` | `encrypt(byte[] data)` Encrypt the input data.
    `void` | `init()` For initialization operations.
    `SymmetricKeyEncryptionService` | `setSecretKey(Key secretKey)` The key used to encrypt and decrypt the data.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SymmetricKeyEncryptionService

          public SymmetricKeyEncryptionService()

  - ### Method Detail

    - #### setSecretKey

          public SymmetricKeyEncryptionService setSecretKey(Key secretKey)

      The key used to encrypt and decrypt the data.
      Parameters:
        `secretKey` - Secret key.
      Returns:
        `this` for chaining.

    - #### init

          public void init()
                    throws IgniteException

      For initialization operations. Must be called before the `EncryptionService.encrypt(byte[])` and `EncryptionService.decrypt(byte[])` are used.
      Specified by:
        `init` in interface `EncryptionService`
      Throws:
        `IgniteException`

    - #### encrypt

          public byte[] encrypt(byte[] data)

      Encrypt the input data.
      Specified by:
        `encrypt` in interface `EncryptionService`
      Parameters:
        `data` - Data. bytes to be encrypted.
      Returns:
        The encrypted data bytes.

    - #### decrypt

          public byte[] decrypt(byte[] data)

      Decrypt the input data.
      Specified by:
        `decrypt` in interface `EncryptionService`
      Parameters:
        `data` - Encrypted data.
      Returns:
        Decrypted result.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021