+
    ¢THi¶  ã                   óò   € R t ^ RIt^ RIHtHt ^ RIHt ^ RIHu H	t
 ^ RIHt ^ RIHtHt RR.tRR ltR	t ! R
 R]
P&                  ]
P(                  4      t ! R R]
P,                  ]
P.                  4      tR# )zOracle DB Password HashesN)ÚhexlifyÚ	unhexlify)Úsha1)Údes_encrypt_block)Ú
to_unicodeÚ	xor_bytesÚoracle10Úoracle11c                óÂ   € W\        V4      ) ^,          ,          ,          pTp\        ^ \        V4      ^4       F"  p\        WAWU^,            4      p\        W4      pK$  	  V# )aÁ  performs des-cbc encryption, returns only last block.

this performs a specific DES-CBC encryption implementation
as needed by the Oracle10 hash. it probably won't be useful for
other purposes as-is.

input value is null-padded to multiple of 8 bytes.

:arg key: des key as bytes
:arg value: value to encrypt, as bytes.
:param iv: optional IV
:param pad: optional pad byte

:returns: last block of DES-CBC encryption of all ``value``'s byte blocks.
)ÚlenÚranger   r   )ÚkeyÚvalueÚivÚpadÚhashÚoffsetÚchunks   &&&&   Ú9/usr/lib/python3/dist-packages/passlib/handlers/oracle.pyÚdes_cbc_encryptr      s[   € ð  
”S˜“Z�K !•OÕ$Õ$€EØ€DÜ˜œ3˜u›: qÖ)ˆÜ˜$ f¸­zÐ :Ó;ˆÜ  Ó,Šñ *ð €Kó    s   #Eg‰«Íïc                   óZ   a € ] tR t^*t o RtR t]P                  t^t	]
R 4       tR tRtV tR# )r   aã  This class implements the password hash used by Oracle up to version 10g, and follows the :ref:`password-hash-api`.

It does a single round of hashing, and relies on the username as the salt.

The :meth:`~passlib.ifc.PasswordHash.hash`, :meth:`~passlib.ifc.PasswordHash.genhash`, and :meth:`~passlib.ifc.PasswordHash.verify` methods all require the
following additional contextual keywords:

:type user: str
:param user: name of oracle user account this password is associated with.
c                ó"   € VP                  4       # )N)Úupper)Úclsr   s   &&r   Ú
_norm_hashÚoracle10._norm_hash:   s   € à�z‰z‹|Ðr   c                óP  € \        V\        4      '       d   VP                  R 4      p\        V P                  R RR7      pW!,           P                  4       P                  R4      p\        \        V4      p\        WC4      p\        V4      P                  R4      P                  4       # )úutf-8Úuser)Úparamz	utf-16-beÚascii)
Ú
isinstanceÚbytesÚdecoder   r   r   Úencoder   ÚORACLE10_MAGICr   )ÚselfÚsecretr   Úinputr   s   &&   r   Ú_calc_checksumÚoracle10._calc_checksum>   s€   € ô �fœe×$Ò$Ø—]‘] 7Ó+ˆFÜ˜$Ÿ)™) W°FÔ;ˆØ•×%Ñ%Ó'×.Ñ.¨{Ó;ˆÜœ~¨uÓ5ˆÜ˜tÓ+ˆÜ�t‹}×#Ñ# GÓ,×2Ñ2Ó4Ð4r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚnameÚuhÚ	HEX_CHARSÚchecksum_charsÚchecksum_sizeÚclassmethodr   r*   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r   *   s;   ø‡ € ñ	ð €DØ—\‘\€NØ€Màñó ð÷5ð 5r   c                   ó¾   a € ] tR t^St o RtR tRt^(t]P                  t
^;tt]P                  t]P                  ! R]P                   4      t]R 4       tR tR tRtV tR# )	r	   a  This class implements the Oracle11g password hash, and follows the :ref:`password-hash-api`.

It supports a fixed-length salt.

The :meth:`~passlib.ifc.PasswordHash.using` method accepts the following optional keywords:

:type salt: str
:param salt:
    Optional salt string.
    If not specified, one will be autogenerated (this is recommended).
    If specified, it must be 20 hexadecimal characters.

:type relaxed: bool
:param relaxed:
    By default, providing an invalid value for one of the other
    keywords will result in a :exc:`ValueError`. If ``relaxed=True``,
    and the error can be corrected, a :exc:`~passlib.exc.PasslibHashWarning`
    will be issued instead. Correctable errors include
    ``salt`` strings that are too long.

    .. versionadded:: 1.6
z/^S:(?P<chk>[0-9a-f]{40})(?P<salt>[0-9a-f]{20})$c                óö   € \        VR R4      pV P                  P                  V4      pV'       g    \        P                  P                  V 4      hVP                  RR4      w  r4V ! W4P                  4       R7      # )r!   r   ÚsaltÚchk)r>   Úchecksum)r   Ú_hash_regexÚmatchr3   ÚexcÚInvalidHashErrorÚgroupr   )r   r   Úmr>   r?   s   &&   r   Úfrom_stringÚoracle11.from_stringx   s_   € ä˜$ ¨Ó0ˆØ�O‰O×!Ñ! $Ó'ˆßÜ—&‘&×)Ñ)¨#Ó.Ð.Ø—G‘G˜F EÓ*‰	ˆÙ˜§y¡y£{Ô3Ð3r   c                ót   € V P                   pR VP                  4        V P                  P                  4        2# )zS:)r@   r   r>   )r'   r?   s   & r   Ú	to_stringÚoracle11.to_string�   s.   € Ø�m‰mˆØ�C—I‘I“K�= §¡§¡Ó!2Ð 3Ð4Ð4r   c                óô   € \        V\        4      '       d   VP                  R 4      p\        V\	        V P
                  P                  R4      4      ,           4      P                  4       pVP                  4       # )r   r!   )r"   Ústrr%   r   r   r>   Ú	hexdigestr   )r'   r(   r?   s   && r   r*   Úoracle11._calc_checksum…   sU   € Ü�fœc×"Ò"Ø—]‘] 7Ó+ˆFÜ�6œI d§i¡i×&6Ñ&6°wÓ&?Ó@Õ@ÓA×KÑKÓMˆØ�y‰y‹{Ðr   r,   N)r>   )r-   r.   r/   r0   r1   r2   Úsetting_kwdsr6   r3   ÚUPPER_HEX_CHARSr5   Úmin_salt_sizeÚmax_salt_sizeÚ
salt_charsÚreÚcompileÚ
IGNORECASErA   r7   rG   rJ   r*   r8   r9   r:   s   @r   r	   r	   S   sw   ø‡ € ñð0 €DØ€LØ€MØ×'Ñ'€Nð %'Ð&€M�MØ×#Ñ#€JØ—*’*Ø9¸2¿=¹=ó€Kð ñ4ó ð4ò5÷ð r   )s           ó    )r1   rU   Úbinasciir   r   Úhashlibr   Úpasslib.utils.handlersÚutilsÚhandlersr3   Úpasslib.crypto.desr   Úpasslib.utilsr   r   Ú__all__r   r&   ÚHasUserContextÚStaticHandlerr   ÚHasSaltÚGenericHandlerr	   r,   r   r   Ú<module>re      sf   ðÙ ã 	ß 'Ý ç #Ð #Ý 0ß /à�zÐ
"€ôð2 5€ô&5ˆr× Ñ  "×"2Ñ"2ô &5ôR6ˆr�z‰z˜2×,Ñ,ö 6r   