# coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = [
    'RsadecryptResult',
    'AwaitableRsadecryptResult',
    'rsadecrypt',
    'rsadecrypt_output',
]

@pulumi.output_type
class RsadecryptResult:
    def __init__(__self__, result=None):
        if result and not isinstance(result, str):
            raise TypeError("Expected argument 'result' to be a str")
        pulumi.set(__self__, "result", result)

    @property
    @pulumi.getter
    def result(self) -> str:
        return pulumi.get(self, "result")


class AwaitableRsadecryptResult(RsadecryptResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return RsadecryptResult(
            result=self.result)


def rsadecrypt(cipher_text: Optional[str] = None,
               key: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableRsadecryptResult:
    """
    Decrypts an RSA-encrypted ciphertext.
    The cipher text must be base64-encoded and the key must be in PEM format.
    """
    __args__ = dict()
    __args__['cipherText'] = cipher_text
    __args__['key'] = key
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('std:index:rsadecrypt', __args__, opts=opts, typ=RsadecryptResult).value

    return AwaitableRsadecryptResult(
        result=__ret__.result)


@_utilities.lift_output_func(rsadecrypt)
def rsadecrypt_output(cipher_text: Optional[pulumi.Input[str]] = None,
                      key: Optional[pulumi.Input[str]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[RsadecryptResult]:
    """
    Decrypts an RSA-encrypted ciphertext.
    The cipher text must be base64-encoded and the key must be in PEM format.
    """
    ...
