original_string: function decrypt(EncryptedPersonalData $data, CryptographicDetails $crypto): PersonalData {
  
          if ( ! $crypto->encryption() == 'libsodium') {
              throw new CryptographicDetailsNotCompatibleWithEncryption("{$crypto->encryption()} received, expected 'libsodium'");
          }
  
          $encrypted = $data->toString();
          $secretKey = $crypto->key('secretKey');
          $nonce     = $crypto->key('nonce');
  
          $decrypted = sodium_crypto_secretbox_open($encrypted, $nonce, $secretKey);
  
          return PersonalData::fromString($decrypted);
      }
code: function decrypt(EncryptedPersonalData $data, CryptographicDetails $crypto): PersonalData {
  
          if ( ! $crypto->encryption() == 'libsodium') {
              throw new CryptographicDetailsNotCompatibleWithEncryption("{$crypto->encryption()} received, expected 'libsodium'");
          }
  
          $encrypted = $data->toString();
          $secretKey = $crypto->key('secretKey');
          $nonce     = $crypto->key('nonce');
  
          $decrypted = sodium_crypto_secretbox_open($encrypted, $nonce, $secretKey);
  
          return PersonalData::fromString($decrypted);
      }
code_tokens: function decrypt ( EncryptedPersonalData $ data , CryptographicDetails $ crypto ) : PersonalData { if ( ! $ crypto -> encryption ( ) == 'libsodium' ) { throw new CryptographicDetailsNotCompatibleWithEncryption ( "{$crypto->encryption()} received, expected 'libsodium'" ) ; } $ encrypted = $ data -> toString ( ) ; $ secretKey = $ crypto -> key ( 'secretKey' ) ; $ nonce = $ crypto -> key ( 'nonce' ) ; $ decrypted = sodium_crypto_secretbox_open ( $ encrypted , $ nonce , $ secretKey ) ; return PersonalData :: fromString ( $ decrypted ) ; }
docstring: decrypted encrypted personal data and return a decrypted form
  
  @param EncryptedPersonalData $data
  @param CryptographicDetails $crypto
  @throws CryptographicDetailsDoNotContainKey
  @throws CryptographicDetailsNotCompatibleWithEncryption
  @return PersonalData
docstring_tokens: decrypted encrypted personal data and return a decrypted form