User Profile

Collapse

Profile Sidebar

Collapse
Rafael Justo
Rafael Justo
Last Activity: Oct 28 '10, 01:49 PM
Joined: Mar 30 '07
Location: São Paulo - Brazil
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Rafael Justo
    started a topic Pure virtual methods cannot be inherit?
    in C

    Pure virtual methods cannot be inherit?

    Check the following code example:

    Code:
    ///////////////////////
    
    class A
    {
    public:
      int a;
    };
    
    ///////////////////////
    
    class B : public A {};
    
    ///////////////////////
    
    class C
    {
    public:
      virtual void c(A *a) = 0;
    };
    
    ///////////////////////
    
    class D : public C
    {
      void c(B *b) {}
    };
    ...
    See more | Go to post

  • I use pack_into to build a buffer of bytes that are going to be the modulus of a public key. I think that the problem isn't what I suspected, the \x30 when wrote in a terminal is replaced by 'zero' as you said.

    The main problem is to convert a DNSKEY (dns record) into a public key structure (RSA) of M2crypto. Today I'm doing the following:

    Code:
        # Exponent and modulus must be in a string in OpenSSL's MPINT
    ...
    See more | Go to post

    Leave a comment:


  • Why pack_into doesn't write correctly some bytes?

    When I try to write a specific byte (letter 'p') in a writable buffer using pack_into the result is a corrupted data:

    Code:
    >>> from ctypes import create_string_buffer
    >>> from struct import pack_into
    >>> test = create_string_buffer(1)
    >>> pack_into("B", test, 0, 48)
    >>> print repr(test.raw)
    '0'
    The answer should be '\x30'....
    See more | Go to post

  • Rafael Justo
    replied to Steganography algorithm in python?
    Thanks Glenton! I will probably implement the F5 algorithm using the Pyhton Image Library. I was just hoping to find some similar steganography library already developed.
    See more | Go to post

    Leave a comment:


  • Rafael Justo
    started a topic Steganography algorithm in python?

    Steganography algorithm in python?

    Hi,

    I'm developing a library to manage passwords and hide them in images. For now I'm using stepic, but this library only allows BMP images (easy to find info). I was wondering if there's any other steganography library in python. An implementation of F5 algorithm would be perfect! Any clues?

    Project homepage: http://www.assembla.com/wiki/show/cU...ir3R8beJe5afGb

    Regards,
    Rafael
    See more | Go to post

  • Rafael Justo
    replied to Accessing class attribute
    Thanks bvdet!

    The setattr method was perfect for me!
    setattr(class, attribute, value)
    See more | Go to post

    Leave a comment:


  • Rafael Justo
    started a topic Accessing class attribute

    Accessing class attribute

    Hi,

    I'm new in python development (NEWBIE). While I was using Cheetah Templates I got a problem about accessing template variables.

    I have an object like this (class Template):

    Code:
    >>> class A:
    ...  x = 1
    ...  y = 2
    ...  z = 3
    But I'm just going to know the attributes names "on the fly". How can I set/get this attributes if I have just...
    See more | Go to post

  • Rafael Justo
    replied to Writing to a file.
    in C
    C++ - i/o

    The following code is going to overwrite any existing file called "file.txt".

    Code:
    #include <fstream>
    using std::ofstream;
    using std::endl;
    
    ofstream fileStream("file.txt");
    if (fileStream.good() == true) {
      fileStream << "This is a test message!" << endl;
      fileStream.close();
    }
    See more | Go to post

    Leave a comment:


  • Just press: Ctrl + L
    Or type: \! clear
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...