o
    ëÉ¶dÈ
  ã                   @   sD   d dl mZ d dlZG dd„ deƒZe ej¡G dd„ deƒƒZdS )é    )ÚsixNc                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚCryptoResultzB
    The result of an SDK encryption or decryption operation.
    c                 C   s   || _ || _dS )a  
        Creates a CryptoResult object.

        :param bytes data:
            The encrypted or decrypted bytes associated with this CryptoResult.

        :param dict encryption_context:
            The encryption_context associated with this CryptoResult.
        N)Ú_dataÚ_encryption_context)ÚselfÚdataZencryption_context© r   ú9usr/lib/python3.10/site-packages/oci/encryption/models.pyÚ__init__   s   

zCryptoResult.__init__c                 C   ó   | j S )zt
        Returns the encrypted or decrypted bytes associated with this CryptoResult.

        :rtype: bytes
        )r   ©r   r   r   r	   Úget_data   s   zCryptoResult.get_datac                 C   r   )a&  
        Returns the encryption context associated with this CryptoResult.

        Note that the SDK may internally add keys to the encryption context so the context returned
        is guaranteed to be a superset of the context passed in but not an exact match.

        :rtype: dict
        )r   r   r   r   r	   Úget_encryption_context"   s   	z#CryptoResult.get_encryption_contextN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r	   r   	   s
    r   c                   @   s:   e Zd ZdZejdd„ ƒZejdd„ ƒZejdd„ ƒZdS )	ÚCryptoResultStreamzI
    The result of an SDK stream encryption or decryption operation.
    c                 C   ó   dS )z~
        Read up to size bytes from the resulting encrypted or decrypted data and return them.

        :rtype: bytes
        Nr   )r   Úsizer   r   r	   Úread3   s   zCryptoResultStream.readc                 C   r   )aÄ  
        Close this CryptoResultStream and release the internal buffer.

        Once the CryptoResultStream is closed, any operation on the stream (e.g. reading) will raise a ValueError.

        As a convenience, it is allowed to call this method more than once; only the first call, however, will have an effect.

        Note: this does not close the underlying stream that the caller passed in during initialization.

        :rtype: None
        Nr   r   r   r   r	   Úclose<   s   zCryptoResultStream.closec                 C   r   )a<  
        Returns the encryption context associated with the stream being encrypted or decrypted.

        Note that the SDK may internally add keys to the encryption context so the context returned
        is guaranteed to be a superset of the context passed in but not an exact match.

        :rtype: dict
        Nr   r   r   r   r	   r   K   s   
z)CryptoResultStream.get_encryption_contextN)	r   r   r   r   ÚabcÚabstractmethodr   r   r   r   r   r   r	   r   .   s    

r   )Zoci._vendorr   r   Úobjectr   Zadd_metaclassÚABCMetar   r   r   r   r	   Ú<module>   s
   
%