Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.fgov.ehealth.etee.crypto.policies
Class EncryptionCredential

    java.lang.Object
      be.fgov.ehealth.etee.crypto.policies.EncryptionCredential

    public final class EncryptionCredential

extends java.lang.Object

An encryption credential assembles data to encrypt or decrypt messages.

Method Summary
`static EncryptionCredential` | `create(java.security.PrivateKey privateKey, java.lang.String keyId)` Factory method to create a new instance of `EncryptionCredential` to decrypt data.
`static EncryptionCredential` | `create(java.security.PublicKey publicKey, java.lang.String keyId)` Factory method to create a new instance of `EncryptionCredential` to encrypt data with a publicKey.
`static EncryptionCredential` | `create(javax.crypto.SecretKey symKey, java.lang.String keyId)` Factory method to create a new instance of `EncryptionCredential` to encrypt data with a symmetric Key.
`static EncryptionCredential` | `create(java.security.cert.X509Certificate certificate)` Factory method to create a new instance of `EncryptionCredential` to encrypt data with the public key of a certificate.
`java.security.cert.X509Certificate` | `getCertificate()`
`java.lang.String` | `getEncryptionTokenSerialNumber()` Deprecated. use `getKeyId()`
`java.lang.String` | `getKeyId()`
`java.security.PrivateKey` | `getPrivateKey()`
`java.security.PublicKey` | `getPublicKey()`
`javax.crypto.SecretKey` | `getSymKek()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getKeyId

    public java.lang.String getKeyId()

### getSymKek

    public javax.crypto.SecretKey getSymKek()

### create

    public static EncryptionCredential create(java.security.PrivateKey privateKey,
                                              java.lang.String keyId)

  Factory method to create a new instance of `EncryptionCredential` to decrypt data.

  Returns:
    A new instance of `EncryptionCredential`

### create

    public static EncryptionCredential create(java.security.PublicKey publicKey,
                                              java.lang.String keyId)

  Factory method to create a new instance of `EncryptionCredential` to encrypt data with a publicKey.

  Returns:
    A new instance of `EncryptionCredential`

### create

    public static EncryptionCredential create(javax.crypto.SecretKey symKey,
                                              java.lang.String keyId)

  Factory method to create a new instance of `EncryptionCredential` to encrypt data with a symmetric Key.

  Returns:
    A new instance of `EncryptionCredential`

### create

    public static EncryptionCredential create(java.security.cert.X509Certificate certificate)

  Factory method to create a new instance of `EncryptionCredential` to encrypt data with the public key of a certificate.

  Returns:
    A new instance of `EncryptionCredential`

### getPrivateKey

    public java.security.PrivateKey getPrivateKey()

### getEncryptionTokenSerialNumber

    @Deprecated
    public java.lang.String getEncryptionTokenSerialNumber()

  Deprecated. use `getKeyId()`

### getPublicKey

    public java.security.PublicKey getPublicKey()

### getCertificate

    public java.security.cert.X509Certificate getCertificate()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2019 eHealth. All Rights Reserved.