原始密钥格式


🌐 Raw key formats

稳定性: 1.1 - 处于活跃开发中

'raw-public''raw-private''raw-seed' 密钥格式允许在没有任何编码封装的情况下导入和导出原始密钥材料。有关使用详情,请参见 keyObject.export()crypto.createPublicKey()crypto.createPrivateKey()

🌐 The 'raw-public', 'raw-private', and 'raw-seed' key formats allow importing and exporting raw key material without any encoding wrapper. See keyObject.export(), crypto.createPublicKey(), and crypto.createPrivateKey() for usage details.

'raw-public' 通常是导入公钥的最快方式。 'raw-private''raw-seed' 并不总是比其他格式更快,因为它们只包含私有标量或种子——导入它们需要推导公钥组件(例如椭圆曲线点乘或种子扩展),这可能很耗费资源。其他格式包括私有和公有组件,从而避免了这种计算。