mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1927 from mpcomplete/keypair
flx: Remove deprecated KeyPair class.
This commit is contained in:
commit
ec7291a2f4
@ -161,16 +161,3 @@ AsymmetricKeyPair keyPairFromPrivateKeyBytes(List<int> privateKeyBytes) {
|
||||
ECPublicKey publicKey = _publicKeyFromPrivateKey(privateKey);
|
||||
return new AsymmetricKeyPair(publicKey, privateKey);
|
||||
}
|
||||
|
||||
// TODO(mpcomplete): remove this class when flutter_tools is updated.
|
||||
class KeyPair extends AsymmetricKeyPair {
|
||||
KeyPair(PublicKey publicKey, PrivateKey privateKey)
|
||||
: super(publicKey, privateKey);
|
||||
|
||||
static KeyPair readFromPrivateKeySync(String privateKeyPath) {
|
||||
AsymmetricKeyPair pair = keyPairFromPrivateKeyFileSync(privateKeyPath);
|
||||
if (pair == null)
|
||||
return null;
|
||||
return new KeyPair(pair.publicKey, pair.privateKey);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user