
- Add `PrivateKey` and `PublicKey` classes. A `PrivateKey` can always be passed where a `PublicKey` key is expected, but not vice versa. - Unexport `Key`, and export `PrivateKey` and `PublicKey`. - Rename `Key.packetlist2structure` to `Key.packetListToStructure`. - Change `Key.update` to return a new updated key, rather than modifying the destination one in place. - Add `openpgp.readPrivateKey` and `openpgp.readPrivateKeys` to avoid having to downcast the result of `readKey(s)` in TypeScript.
34 lines
524 B
JavaScript
34 lines
524 B
JavaScript
import {
|
|
readKey,
|
|
readKeys,
|
|
readPrivateKey,
|
|
readPrivateKeys,
|
|
generate,
|
|
reformat
|
|
} from './factory';
|
|
|
|
import {
|
|
getPreferredAlgo,
|
|
isAEADSupported,
|
|
getPreferredHashAlgo,
|
|
createSignaturePacket
|
|
} from './helper';
|
|
|
|
import PrivateKey from './private_key.js';
|
|
import PublicKey from './public_key.js';
|
|
|
|
export {
|
|
readKey,
|
|
readKeys,
|
|
readPrivateKey,
|
|
readPrivateKeys,
|
|
generate,
|
|
reformat,
|
|
getPreferredAlgo,
|
|
isAEADSupported,
|
|
getPreferredHashAlgo,
|
|
createSignaturePacket,
|
|
PrivateKey,
|
|
PublicKey
|
|
};
|