thirdparty/blake/blake_wrapper.py
def addsalt(self, salt):
        """ adds a salt to the hash function (OPTIONAL)
            should be called AFTER Init, and BEFORE update
            salt:  a bytestring, length determined by hashbitlen.
              if hashbitlen=224 or 256, then salt will be 16 bytes
              if hashbitlen=384 or 512, then salt will be 32 bytes
        """
        # fail if addsalt() was not called at the right time
        if self.init != 1:
            raise Exception('addsalt() not called after init() and before update()')

        # is salt size correct?
        saltsize = 16 if self.hashbitlen in [224, 256] else 32
        if len(salt) != saltsize:
            raise Exception('incorrect salt length')

        # do it
        ret = LIB.AddSalt(self.state, salt)
        if ret:
            raise Exception('AddSalt() ret = %d', ret)
 adds a salt to the hash function (OPTIONAL)
            should be called AFTER Init, and BEFORE update
            salt:  a bytestring, length determined by hashbitlen.
              if hashbitlen=224 or 256, then salt will be 16 bytes
              if hashbitlen=384 or 512, then salt will be 32 bytes
        
adds a salt to the hash function (OPTIONAL)
should be called AFTER Init, and BEFORE update
salt:  a bytestring, length determined by hashbitlen.
if hashbitlen=224 or 256, then salt will be 16 bytes
if hashbitlen=384 or 512, then salt will be 32 bytes
adds a salt to the hash function ( OPTIONAL ) should be called AFTER Init and BEFORE update salt : a bytestring length determined by hashbitlen . if hashbitlen = 224 or 256 then salt will be 16 bytes if hashbitlen = 384 or 512 then salt will be 32 bytes
def addsalt(self, salt):
        if self.init != 1:
            raise Exception('addsalt() not called after init() and before update()')
        saltsize = 16 if self.hashbitlen in [224, 256] else 32
        if len(salt) != saltsize:
            raise Exception('incorrect salt length')
        ret = LIB.AddSalt(self.state, salt)
        if ret:
            raise Exception('AddSalt() ret = %d', ret)
def addsalt ( self , salt ) : if self . init != 1 : raise Exception ( 'addsalt() not called after init() and before update()' ) saltsize = 16 if self . hashbitlen in [ 224 , 256 ] else 32 if len ( salt ) != saltsize : raise Exception ( 'incorrect salt length' ) ret = LIB . AddSalt ( self . state , salt ) if ret : raise Exception ( 'AddSalt() ret = %d' , ret )
adds a salt to the hash function (OPTIONAL)
should be called AFTER Init, and BEFORE update
salt:  a bytestring, length determined by hashbitlen.
adds a salt to the hash function ( OPTIONAL ) should be called AFTER Init and BEFORE update salt : a bytestring length determined by hashbitlen .
""" adds a salt to the hash function (OPTIONAL)
            should be called AFTER Init, and BEFORE update
            salt:  a bytestring, length determined by hashbitlen.
              if hashbitlen=224 or 256, then salt will be 16 bytes
              if hashbitlen=384 or 512, then salt will be 32 bytes
        """ # fail if addsalt() was not called at the right time # is salt size correct? # do it
self
salt