modify comment

This commit is contained in:
tamaina 2024-07-18 00:04:35 +09:00
parent 72cda5ca80
commit 95918607f4
1 changed files with 4 additions and 3 deletions

View File

@ -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