KeyObject
KeyObject 是解析后的密钥的内存表示。它由 crypto.createPublicKey()、crypto.createPrivateKey()、crypto.createSecretKey() 或诸如 crypto.generateKeyPair() 的密钥生成函数创建。使用给定 KeyObject 的第一次加密操作可能比后续操作更慢,因为 OpenSSL 会在首次使用时懒惰地初始化内部缓存。
🌐 A KeyObject is the in-memory representation of a parsed key. It is
created by crypto.createPublicKey(), crypto.createPrivateKey(),
crypto.createSecretKey(), or key generation functions such as
crypto.generateKeyPair(). The first cryptographic operation with a given
KeyObject may be slower than subsequent ones because OpenSSL lazily
initializes internal caches on first use.