#NEWLINE# def sign( self , bytes ) : #NEWLINE# #INDENT# 'Sign the passed-in bytes.\n\n        This requires the key to have a private component.  It performs\n        a PKCS1 signature on the passed-in data.\n\n        @type bytes: L{array.array} of unsigned bytes\n        @param bytes: The value which will be signed.\n\n        @rtype: L{array.array} of unsigned bytes.\n        @return: A PKCS1 signature on the passed-in data.\n        ' #NEWLINE# if ( not self . hasPrivateKey ( ) ) : #NEWLINE# #INDENT# raise AssertionError ( ) #NEWLINE# #UNINDENT# paddedBytes = self . _addPKCS1Padding ( bytes , 1 ) #NEWLINE# m = bytesToNumber ( paddedBytes ) #NEWLINE# if ( m >= paddedBytes . n ) : #NEWLINE# #INDENT# raise ValueError ( ) #NEWLINE# #UNINDENT# c = self . _rawPrivateKeyOp ( m ) #NEWLINE# sigBytes = numberToBytes ( c ) #NEWLINE# return sigBytes