
from random import choice
from string import ascii_letters, digits
import secretstorage
from keyring import set_password, get_password


__author__ = 'Shamal Faily'

def setDatabasePassword(dbUser):
  rp = ''.join(choice(ascii_letters + digits) for i in range(32))
  set_password('cairisdb',dbUser,rp)
  return rp

def getDatabasePassword(dbUser):
  return get_password('cairisdb',dbUser)


from random import choice
from string import ascii_letters, digits
import secretstorage
from keyring import set_password, get_password


__author__ = 'Shamal Faily'

def setDatabasePassword(dbUser):
#  rp = ''.join(choice(ascii_letters + digits) for i in range(32))
#  set_password('cairisdb',dbUser,rp)
#  return rp
  return ''

def getDatabasePassword(dbUser):
#  return get_password('cairisdb',dbUser)
  return ''

Revert database password policy while problems with keyring investigated
Revert database password policy while problems with keyring investigated

  
  from random import choice
  from string import ascii_letters, digits
  import secretstorage
  from keyring import set_password, get_password
  
  
  __author__ = 'Shamal Faily'
  
  def setDatabasePassword(dbUser):
-   rp = ''.join(choice(ascii_letters + digits) for i in range(32))
+ #  rp = ''.join(choice(ascii_letters + digits) for i in range(32))
-   set_password('cairisdb',dbUser,rp)
+ #  set_password('cairisdb',dbUser,rp)
-   return rp
+ #  return rp
+   return ''
  
  def getDatabasePassword(dbUser):
-   return get_password('cairisdb',dbUser)
+ #  return get_password('cairisdb',dbUser)
+   return ''
  
Revert database password policy while problems with keyring investigated
## Code Before:

from random import choice
from string import ascii_letters, digits
import secretstorage
from keyring import set_password, get_password


__author__ = 'Shamal Faily'

def setDatabasePassword(dbUser):
  rp = ''.join(choice(ascii_letters + digits) for i in range(32))
  set_password('cairisdb',dbUser,rp)
  return rp

def getDatabasePassword(dbUser):
  return get_password('cairisdb',dbUser)

## Instruction:
Revert database password policy while problems with keyring investigated
## Code After:

from random import choice
from string import ascii_letters, digits
import secretstorage
from keyring import set_password, get_password


__author__ = 'Shamal Faily'

def setDatabasePassword(dbUser):
#  rp = ''.join(choice(ascii_letters + digits) for i in range(32))
#  set_password('cairisdb',dbUser,rp)
#  return rp
  return ''

def getDatabasePassword(dbUser):
#  return get_password('cairisdb',dbUser)
  return ''
