modify comment
This commit is contained in:
parent
72cda5ca80
commit
95918607f4
|
@ -83,13 +83,14 @@ export class UserKeypairService implements OnApplicationShutdown {
|
||||||
* Using cache due to performance reasons of `crypto.subtle.importKey`
|
* Using cache due to performance reasons of `crypto.subtle.importKey`
|
||||||
* @param userIdOrHint user id, MiUserKeypair, or PrivateKeyWithPem
|
* @param userIdOrHint user id, MiUserKeypair, or PrivateKeyWithPem
|
||||||
* @param preferType
|
* @param preferType
|
||||||
* If ed25519-like(`ed25519`, `01`, `11`) is specified, ed25519 keypair is returned if exists.
|
* If ed25519-like(`ed25519`, `01`, `11`) is specified, ed25519 keypair will be returned if exists.
|
||||||
* Otherwise, main keypair is returned. (ignored if userIdOrHint is PrivateKeyWithPem)
|
* Otherwise, main keypair will be returned. (ignored if userIdOrHint is PrivateKeyWithPem)
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
@bindThis
|
@bindThis
|
||||||
public async getLocalUserPrivateKey(
|
public async getLocalUserPrivateKey(
|
||||||
userIdOrHint: MiUser['id'] | MiUserKeypair | PrivateKeyWithPem, preferType?: string,
|
userIdOrHint: MiUser['id'] | MiUserKeypair | PrivateKeyWithPem,
|
||||||
|
preferType?: string,
|
||||||
): Promise<PrivateKey> {
|
): Promise<PrivateKey> {
|
||||||
if (typeof userIdOrHint === 'object' && 'privateKeyPem' in userIdOrHint) {
|
if (typeof userIdOrHint === 'object' && 'privateKeyPem' in userIdOrHint) {
|
||||||
// userIdOrHint is PrivateKeyWithPem
|
// userIdOrHint is PrivateKeyWithPem
|
||||||
|
|
Loading…
Reference in New Issue