File: keystore.py

package info (click to toggle)
python-plyer 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,808 kB
  • sloc: python: 13,395; sh: 217; makefile: 177
file content (32 lines) | stat: -rw-r--r-- 869 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''
Keystore
=======
The :class:`Keystore` provides a mechanism for securing/storing
cryptographic keys (such as user credentials) in a container.
Typically needed to support authentication APIs such as OAuth2
.. note::
    Typically needed to support authentication APIs such as OAuth2

Supported Platforms
-------------------
Android, iOS, Windows, OS X, Linux
---------------
'''


class Keystore:
    '''
    Keystore facade
    '''

    def set_key(self, servicename, key, value, **kwargs):
        self._set_key(servicename, key, value, **kwargs)

    def _set_key(self, servicename, key, value, **kwargs):
        raise NotImplementedError()

    def get_key(self, servicename, key, **kwargs):
        return self._get_key(servicename, key)

    def _get_key(self, servicename, key, **kwargs):
        raise NotImplementedError()