-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
40 lines (38 loc) · 904 Bytes
/
code.power
File metadata and controls
40 lines (38 loc) · 904 Bytes
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
33
34
35
36
37
38
39
40
/**
* Get the type of password
* Example: $this->get('basic', 'default-password');
*
* @param string $type The value of password to get
* @param string|null $default The default password if the type is not found
*
* @return string|null
* @since 3.2.0
*/
public function get(string $type, ?string $default = null): ?string
{
// we have a local key for JCB only use
if ('local' === $type)
{
return $this->local();
}
elseif (($password = Helper::_('getCryptKey', [$type, $default])) !== null)
{
return $password;
}
return $default;
}
/**
* Get the local password
*
* @return string
* @since 3.2.0
*/
private function local(): string
{
return base64_decode(
Text::sprintf(
JustTEXT::_('VjRzdE%ssMHBtRW50TWV0aE%sFlvVXJTM3J2IXM='),
'QzdmV', '9kQ'
)
);
}