Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KmsCryptoClient

This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.

Hierarchy

  • KmsCryptoClient

Constructors

constructor

  • new KmsCryptoClient(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration): KmsCryptoClient

Properties

Protected _bodyDuplexMode

_bodyDuplexMode: any = undefined

Protected _circuitBreaker

_circuitBreaker: typeof Breaker | null = null

Protected _clientConfiguration

_clientConfiguration: ClientConfiguration

Protected _defaultHeaders

_defaultHeaders: any

Protected _endpoint

_endpoint: string = ""

Protected _httpClient

_httpClient: HttpClient

Protected _httpOptions

_httpOptions: any = undefined

Protected _realmSpecificEndpointTemplateEnabled

_realmSpecificEndpointTemplateEnabled: boolean | undefined = undefined

targetService

targetService: string = "KmsCrypto"

Static Protected endpointServiceName

endpointServiceName: string = ""

Static Protected serviceEndpointTemplate

serviceEndpointTemplate: string = "https://kms.{region}.{secondLevelDomain}"

Accessors

endpoint

  • get endpoint(): string
  • set endpoint(endpoint: string): void

logger

useRealmSpecificEndpointTemplate

  • set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled: boolean): void
  • Determines whether realm specific endpoint should be used or not. Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"

    Parameters

    • realmSpecificEndpointTemplateEnabled: boolean

      flag to enable the use of realm specific endpoint template

    Returns void

Methods

close

  • close(): void

decrypt

encrypt

  • Encrypts data using the given EncryptDataDetails resource. Plaintext included in the example request is a base64-encoded value of a UTF-8 string.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use Encrypt API.

    Parameters

    Returns Promise<EncryptResponse>

    EncryptResponse

exportKey

  • Exports a specific version of a master encryption key according to the details of the request. For their protection, keys that you create and store on a hardware security module (HSM) can never leave the HSM. You can only export keys stored on the server. For export, the key version is encrypted by an RSA public key that you provide. This operation is not supported for keys having protection mode EXTERNAL.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use ExportKey API.

    Parameters

    Returns Promise<ExportKeyResponse>

    ExportKeyResponse

generateDataEncryptionKey

shutdownCircuitBreaker

  • shutdownCircuitBreaker(): void

sign

  • Creates a digital signature for a message or message digest by using the private key of a public-private key pair, also known as an asymmetric key. To verify the generated signature, you can use the Verify operation. Or, if you want to validate the signature outside of the service, you can do so by using the public key of the same asymmetric key. This operation is not supported for keys having protection mode EXTERNAL.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use Sign API.

    Parameters

    Returns Promise<SignResponse>

    SignResponse

verify

  • Verifies a digital signature that was generated by the Sign operation by using the public key of the same asymmetric key that was used to sign the data. If you want to validate the digital signature outside of the service, you can do so by using the public key of the asymmetric key. This operation is not supported for keys having protection mode EXTERNAL.

    This operation does not retry by default if the user has not defined a retry configuration.

    throws

    OciError when an error occurs

    example

    Click here to see how to use Verify API.

    Parameters

    Returns Promise<VerifyResponse>

    VerifyResponse